Open correct report

foxtet

Registered User.
Local time
Tomorrow, 01:26
Joined
May 21, 2011
Messages
129
I have a billing form. After input necessary data I want invoice to be created. When I press create invoice button it displays different invoice.

how to handle this?

foxtet
 
How do you open the report, code or??
If code then show it.
 
I use the following command. it displays all records.but I want display specific record.
Private Sub cmdInv_Click()

Dim strReportname As String
Dim strCriteria As String

strReportname = "rptInvoice"
strCriteria = "[InvNo] = & Me.InvNo"

DoCmd.OpenReport strReportname, acViewPreview, strCriteria

End Sub

foxtet
 
Assuming InvNo is a number you need

strCriteria = "[InvNo] = " & Me.InvNo
 

Users who are viewing this thread

Back
Top Bottom