Pass values ​from a subform to a textbox in another access form

93 Views Asked by At

I would like to create an invoice in a form, pressing a button from another form with the data. Pressing the button would pass the customer data, dates etc. into different textboxes. But the detail of the purchase, the units, the number of invoices, etc. are in a subform. There is no problem to pass the first item to a textbox in the invoice form. But the issue is that there are several items.

This is my code in the button

Private Sub Boton_Click()

Dim strFrmName As String
strFrmName = "FACTURAR"

    DoCmd.OpenForm strFrmName
        With Forms(strFrmName)
             .RUT_2 = Me.RUT
             .REGIS_RECP_2 = Me.registroRecepcion
             .NAME_2 = primerNombre & " " & primerApellido & " " & segundoApellido
             .BOLETA_2 = Me.BOLETA_INV
             .CANT_2 = Me.CANT_INV
           
            'The problems in the subform and thier data...

        End With
End Sub

I have tried to pass subform1 to subform2 but nothing works, I have created a vlookup to search on the subform's source table using outside sharing references (placed in the mainform) but it didn't work. Any idea? It's possible?

0

There are 0 best solutions below