Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / March 2008

Tip: Looking for answers? Try searching our database.

Report can't print form field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tedmi - 18 Mar 2008 20:46 GMT
My report heading contains a text box with the following data source:
="Transactions since " & Forms!frmPrintTran!txtDate

The on-screen preview shows the date fine, but on printing, this textbox
displays #Name?
The form remains open during print.
Happens with both Access 2002 and 2007, DB structure A2000. What gives here?
Thanks.
Signature

TedMi

Duane Hookom - 19 Mar 2008 04:16 GMT
This usually happens when there is code in the On Close of the report that
closes the form.

Signature

Duane Hookom
Microsoft Access MVP

> My report heading contains a text box with the following data source:
> ="Transactions since " & Forms!frmPrintTran!txtDate
[quoted text clipped - 4 lines]
> Happens with both Access 2002 and 2007, DB structure A2000. What gives here?
> Thanks.
tedmi - 19 Mar 2008 14:20 GMT
Thanks, that was it. The form was closed after the report was displayed.
I didn't realize that the textbox in the header gets recalculated before
print. That's strange, because the report's query is not rerun. That leads to
this possibility:
User opens report, returns to the form, changes the date, returns to the
report and prints. The header and data body are out of synch! Had to do some
coding gymnastics to prevent this.
Signature

TedMi

Duane Hookom - 19 Mar 2008 15:19 GMT
I am not aware of situations where a user would leave a report open then
change the dates or other criteria on the form and then print. I have created
hundreds of reports that have been opened thousands of times and never heard
of this being a problem. It might have happened without my knowledge.

Signature

Duane Hookom
Microsoft Access MVP

> Thanks, that was it. The form was closed after the report was displayed.
> I didn't realize that the textbox in the header gets recalculated before
[quoted text clipped - 3 lines]
> report and prints. The header and data body are out of synch! Had to do some
> coding gymnastics to prevent this.
tedmi - 20 Mar 2008 13:51 GMT
Almost happened to me just the other day. User viewed the on-screen report,
noticed the display did not match paper records in hand because the wrong
beginning date had been entered. Closed the report, re-entered date on the
form, reopened report and everything's cool. But what if she had not closed
the report, changed the form and then printed the still-open report? The
print-out would have the correct date, but the wrong data. Refreshing just
part of an object seems intrinsically wrong and a recipe for potential
disaster.

Anyway, I have just noticed that a report can be made modal, thus solving
the problem and eliminating coding gymnastics I had previously applied.

Thanks again for your time.
Signature

TedMi

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.