wwwredback
Registered User.
- Local time
- Today, 09:14
- Joined
- Apr 28, 2009
- Messages
- 37
Hello All, I have a form in MS Access that I want to fill out like an invoice and then print just that particular order using a report but I can't seem to get it to work.
Can someone help please?
Here is the code I am using from a command button to open the report but it shows errors for the fields:
Sub PrintInvoice_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "Orders"
strWhere = "[OrderID]=" & Me!OrderID
DoCmd.OpenReport strDocName, acPreview, , strWhere
End Sub
Thanks in advance.
Can someone help please?
Here is the code I am using from a command button to open the report but it shows errors for the fields:
Sub PrintInvoice_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "Orders"
strWhere = "[OrderID]=" & Me!OrderID
DoCmd.OpenReport strDocName, acPreview, , strWhere
End Sub
Thanks in advance.