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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a specific record in a report

Status
Not open for further replies.

Mattine

Programmer
Apr 11, 2001
25
US
How do I print a specific order number, for example, in a report?
 
this works for me,

Private Sub Command30_Click()
Dim strReportName As String
Dim strCriteria As String

strReportName = "Orders"
strCriteria = "[OrderNo]='" & Me![OrderNo] & "'"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
 
I am receiving a Data Type mismatch when I use this code, any ideas?
 
Hi Mattine
Sorry I can not think why you would get that it has worked on all my forms, search the forum it has more version of doing this i think OK

Pete X-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top