Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#Name? appearing in textbox, but only when printing 1

Status
Not open for further replies.
Jun 2, 2004
66
0
0
US
I have a form called Dates (frmDates) that I enter a begin and end date into. I have a report linked to this form and I would like for these dates to appear in the report’s title (in the report header).

When I use the code (below) in the text box’s Control Source, it works perfectly, but only when viewing the report. When I print the report, the textbox shows up as #Name?


Here’s what I have in the Control Source of my text box….

="Report Period From" & " " & [Forms]![frmDates]![txtBeginDate] & " " & "Through" & " " & [Forms]![frmDates]![txtEndDate]


Any idea why it works when I view the report, but I get #Name? when I print it?
 
Is it possible that the form frmDates is being closed prior to the printing of the report? That would make things show up in Preview but then not be there, and thence #Name, upon printing, as the criteria text boxes are no longer available.


Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top