morganpeet
Registered User.
- Local time
- Today, 22:45
- Joined
- Mar 26, 2009
- Messages
- 14
I am trying to print a report called 'Invoice' from a form showing the order details. I have set up a command button on the form to print the invoice with the event procedure as follows:
strDocName = "Invoice"
DoCmd.OpenReport strDocName, acViewPreview, , "[Invoice No]=Forms![Invoice]![Invoice No]"
When I press the print button i have a box coming up saying Forms![Invoice]![Invoice No]" and if in enter the invoice number then I can print the invoice for that number. How can i get it to work without having to manually enter the invoice number?
(I am quite new to this and have copied bits and pieces from other databases)
strDocName = "Invoice"
DoCmd.OpenReport strDocName, acViewPreview, , "[Invoice No]=Forms![Invoice]![Invoice No]"
When I press the print button i have a box coming up saying Forms![Invoice]![Invoice No]" and if in enter the invoice number then I can print the invoice for that number. How can i get it to work without having to manually enter the invoice number?
(I am quite new to this and have copied bits and pieces from other databases)