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
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