Report Printing/Saving Error Message on Report - '#name?'

JPW

Registered User.
Local time
Today, 19:31
Joined
Nov 4, 2007
Messages
51
I have a problem.

At the moment I have a report that collects various data from query and 2 calender controls. Basically I have a macro button that is used with 2 calender controls. Once I select the Date From and Date to I then press the macro button to print a report - and that all prints fine.

On the top of my report I have the below code:

=Format([Forms]![datecal].[caldatefrom],"mmmm dd yyyy") & " - " & Format([Forms]![datecal].[caldateto],"mmmm dd

This code allow Access to display the date range of the report. eg November 1st 2008 to November 18th 2008. However, this only works when the macro is ordered to print directly. If I set it to print preview and then print I get '#name?' where the date should be.

Now, I need to make a change to my database that results in this report being emailed to the relevant people rather than printed. I would like it to go in .PDF format, and I've found that to do that I will have to set the macro as 'Print Preview' and then print to PDF printer and save file to desktop, but I still get that '#name?' error message when the file is saved.

Is there any way to combat this?

Thank You
 
Try this instead.
Insert two unbound text boxes on your report.
In the textbox Labels enter Start Date and End Date

In the Start Date textbox enter =([Forms]![datecal].[caldatefrom])
In the End Date textbox enter =([Forms]![datecal].[caldateto])
You can set the date properties of the textboxes to your preference.
 
Try this instead.
Insert two unbound text boxes on your report.
In the textbox Labels enter Start Date and End Date

In the Start Date textbox enter =([Forms]![datecal].[caldatefrom])
In the End Date textbox enter =([Forms]![datecal].[caldateto])
You can set the date properties of the textboxes to your preference.


No different than before.

The dates are displayed, but still get that error message once saved as .PDF. It appears fine in the print preview, but for whatever reason something is going wrong.
 

Users who are viewing this thread

Back
Top Bottom