Apr 12, 2001 #1 Mattine Programmer Apr 11, 2001 25 US How do I print a specific order number, for example, in a report?
Apr 13, 2001 #2 bigpete994 MIS Mar 26, 2001 4 GB 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 Upvote 0 Downvote
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
Apr 27, 2001 Thread starter #3 Mattine Programmer Apr 11, 2001 25 US I am receiving a Data Type mismatch when I use this code, any ideas? Upvote 0 Downvote
May 1, 2001 #4 bigpete994 MIS Mar 26, 2001 4 GB 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-) Upvote 0 Downvote
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-)