Error while Exporting Parameter enabled report

chabbir

New member
Local time
Yesterday, 22:29
Joined
Oct 21, 2009
Messages
7
Hi,

I am very new to MS Access. By reading help manuals and viewing Demo I could create a Report which has 2 Parameters. Before generating the report User need to enter "Start Date" and "End Date".

This report is working fine in Access Report View but While trying to export this report in PDF format following error message is shown:

" The expression On Format you entered as the event property setting produced the following error: The Object dosen't contain the Automation object 'Start Date' "

Can anybody help me resolve this error.
 
how are you getting the user to enter the dates?

have you tried using the Eval() function in your query fields?
 
Hi,

The report is linked to a Query which has 2 parameters "Start Date" and "End Date".

Find below the SQL command for the Query:

PARAMETERS [Start Date] DateTime, [End Date] DateTime;
SELECT [CHQ COLLECTION TRACKING].[CUSTOMER NAME], [CHQ COLLECTION TRACKING].[CHEQUE AMT], [CHQ COLLECTION TRACKING].[CLOSING DATE], [CHQ COLLECTION TRACKING].[COMPANY]
FROM [CHQ COLLECTION TRACKING]
WHERE ((([CHQ COLLECTION TRACKING].STATUS)="CLOSED") AND (([CHQ COLLECTION TRACKING].[CLOSING DATE])<=[End Date] And ([CHQ COLLECTION TRACKING].[CLOSING DATE])>=[Start Date]));
UNION ALL SELECT [DIRECT CHQ COLLECTION].[CUSTOMER NAME], [DIRECT CHQ COLLECTION].[CHEQUE AMT], [DIRECT CHQ COLLECTION].[CLOSING DATE], [DIRECT CHQ COLLECTION].[COMPANY]
FROM [DIRECT CHQ COLLECTION]
WHERE ((([DIRECT CHQ COLLECTION].STATUS)="CLOSED") AND (([DIRECT CHQ COLLECTION].[CLOSING DATE])<=[End Date] And ([DIRECT CHQ COLLECTION].[CLOSING DATE])>=[Start Date]));


Is there any better way to accomplish this task?
 
A BETTER way would be to use a FORM for input parameters instead of popups.
 
A BETTER way would be to use a FORM for input parameters instead of popups.

i'm with bob. use a form. an added benefit of a form is you can make the start and end dates as drop down boxes of existing dates in your database (how many times have you opened a sample database with parameter values and not known where to start? spending some time to trawl through 2009, 2008, 2007 dates, only to discover all the records are associated with 1997 or something).

your query would then have the Between operand (something like "Between #forms!frmChooseDates.cmbStartDate# and #forms!frmChooseDates.cmbEndDate#" OR like ">= forms!frmChooseDates.cmbStartDate and <=forms!frmChooseDates.cmbEndDate") as a criteria for the dates.
 
Last edited:
Thanks Bob and Wiklendt,

I created the form and linked report to it. It did wonders!!!!

Thanks once again.
 

Users who are viewing this thread

Back
Top Bottom