browse: forums | FAQ
Connecting Tech Pros Worldwide

Hey there! Do you need Microsoft Access / VBA help?

Get answers from our community of Microsoft Access / VBA experts on BYTES! It's free.

Report shows #Name? when printed but is OK in Preview

Expert
 
Join Date: Sep 2007
Posts: 256
#1: Oct 8 '09
Hi, I have a report that displays the correct data in Preview but displays #Name? when printed. (Access 2003)

The field is unbound but the control source is read from a form

Expand|Select|Wrap|Line Numbers
  1. =[Forms]![dialogRecalls].[DatesBetween_Text] & " (Week " & [Forms]![dialogRecalls]![cmbFrom] & " to Week " & [Forms]![dialogRecalls]![cmbTo] & ")"  
ie. it shows a date range in text that is formatted in the form after the user has selected a week number range from the two combo boxes, and then the contents of the combo boxes.

The dialogue form is kept open until the report close event and the contol width is ample for the text.

Has anybody any ideas why the error?

Many thanks



Expert
 
Join Date: Jul 2008
Location: Maryland
Posts: 1,253
#2: Oct 8 '09

re: Report shows #Name? when printed but is OK in Preview


Do you get the same result if you put code in to just set the value of the text box?
Expert
 
Join Date: Sep 2007
Posts: 256
#3: Oct 8 '09

re: Report shows #Name? when printed but is OK in Preview


Sorry Guys! My error!
The dialogue form was being closed from the 'Preview' command button (on the form) after the command to preview the report, so the data was not available if the user subsequently wanted to print the report.

Thanks anyway
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 16,492
#4: Oct 8 '09

re: Report shows #Name? when printed but is OK in Preview


You had me confused there Sierra. Now it makes sense :)
Reply