reidgivens
Technical User
I have a report that should take the primary keys defined in for and generate the report with that information. It works with the first two test records in the database, but anything after that doesn't work.
I have the report opened by a button on the form with the proper information, but when the report opens it is empty.
The open report code is:
----------------------------code start
Private Sub open_invoice_Click()
On Error GoTo Err_open_invoice_Click
Dim stDocName As String
Dim numvar As String
numvar = "c_id_num=" & Forms!customers!c_id_num & "AND i_id_num=" & Forms!customers!vehicles!invoice!i_id_num_box & "AND v_id_num=" & Forms!customers!vehicles!v_id_num
stDocName = "customers"
DoCmd.OpenReport stDocName, acPreview, , numvar
Exit_open_invoice_Click:
Exit Sub
Err_open_invoice_Click:
MsgBox Err.Description
Resume Exit_open_invoice_Click
End Sub
--------------------------- code stop
Please help thanks
Reid Givens
Webdeveloper
I have the report opened by a button on the form with the proper information, but when the report opens it is empty.
The open report code is:
----------------------------code start
Private Sub open_invoice_Click()
On Error GoTo Err_open_invoice_Click
Dim stDocName As String
Dim numvar As String
numvar = "c_id_num=" & Forms!customers!c_id_num & "AND i_id_num=" & Forms!customers!vehicles!invoice!i_id_num_box & "AND v_id_num=" & Forms!customers!vehicles!v_id_num
stDocName = "customers"
DoCmd.OpenReport stDocName, acPreview, , numvar
Exit_open_invoice_Click:
Exit Sub
Err_open_invoice_Click:
MsgBox Err.Description
Resume Exit_open_invoice_Click
End Sub
--------------------------- code stop
Please help thanks
Reid Givens
Webdeveloper