Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Information Not populating

Status
Not open for further replies.

reidgivens

Technical User
Mar 24, 2003
24
0
0
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top