I've created a form in Access 2003 that uses the Calendar Control. It
grabs a date, then on a Button Click event, the following line is
executed:
DoCmd.OpenReport "Report X", acViewPreview
The report correctly displays the passed Date value. The problem is
that when I print the report, the passed Date value shows up as
#Name?, which means no value was passed.
However, when I change the code to:
DoCmd.OpenReport "Report X", acViewNormal
then the report goes directly to the printer with the correct passed
date value, but I no longer get a screen preview.
So how do I get both the screen view and the printout to both display
the correct date value?
fredg - 27 Mar 2008 21:32 GMT
> I've created a form in Access 2003 that uses the Calendar Control. It
> grabs a date, then on a Button Click event, the following line is
[quoted text clipped - 15 lines]
> So how do I get both the screen view and the printout to both display
> the correct date value?
Asked at least 3 times elsewhere.
Please do not multi-post. If you feel you must post the same question
to more than one newsgroup (and it's seldom necessary), cross-post by
adding each additional newsgroup in the To Newsgroups: box, separated
by a comma.
This way an answer in one newsgroup will be seen in each of the
others. More readers will see the response and learn, and less time
will be spent on duplicate answers.
See Netiquette at http://www.mvps.org/access
It's a great site to visit anyway.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail