I need a couple examples of how to create a condition to open and print a report. All attempts return, report is misspelled, not open, or doesnt excist.
You want to open a report from a command button or such???
DoCmd.OpenReport "rptName", acPreview will open the report in preview mode
DoCmd.OpenReport "rptName" will send the report directly to the printer Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Albert Einstein)
Robert L. Johnson III, MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: mstrmage@tampabay.rr.com
Let's start with the basics....If the reports are identical, except for the data displayed, you are on the wrong path....one query, one report is all that is needed. You just change one parameter in the query (using a text box feed from you call point or something) and it wil all work itself out....
But as you setup is....you would need to do something like:
Select Case DayOfWeek
Case "Monday": DoCmd.OpenReport "Monday", acPreview
...
End Select
If you want to send me a sample of the db, I would be happy to take a lok and set you in the right direction. It is hard to determine if you are using vbWeekday or what to detemine which day of the week you are working with, what other variables may be in play, etc.
I strongly recommend using only one query/report if at all posible.....WHy make seven updates (and you know you will be updating this later) when you can make one and have all the "reports" receive the change. Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Albert Einstein)
Robert L. Johnson III, MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: mstrmage@tampabay.rr.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.