Begin and End Date

ecuevas

Registered User.
Local time
Today, 15:13
Joined
Jun 18, 2007
Messages
74
I have a report based on a query that finds the average response time. When I run the report it prompts me for a begin date and an end date. Then the report shows the average resopnse time between those two dates. How can I get the two dates I entered to show up on the report?
 
Best way to do it is instead of calling the dates from the query, call them from a form.

then put a textbox on your report with forms!yourformname.startdate and another forms!yourformname.enddate on there.

if you need help adjusting your query to reflect that you are using a form you would do

Between forms!yourformname.startdate AND forms!yourformname.enddate as the criteria
 
What would I put in the report?
 
Just reference the controls on your form the same as you did in the criteria of your query
 
I think you misunderstood my question. I already have a prompt. I just need the dates that I type in to the prompt to appear on the report.
 
create your own prompt. it sounds to me like you are using the query prompt.
use a form as your prompt and you will be able to do what you are wanting
 
As long as your form is open when you open the report you can reference the control on your form with the begin and End data. Something like below in the control source of you control in your form

=forms!yourformname.startdate
 
I got the dates to show up but now the average won't show up.
 
make sure to change the values in the average calculation too
 
I changed it to Between ([Customer Complaint Log].[Date of Complaint])=[forms]![AVERAGE].[startdate] And ([Customer Complaint Log].[Date of Complaint])=[forms]![AVERAGE].[enddate] but it doesn't do anything when I run it.
 
I changed it to Between ([Customer Complaint Log].[Date of Complaint])=[forms]![AVERAGE].[startdate] And ([Customer Complaint Log].[Date of Complaint])=[forms]![AVERAGE].[enddate] but it doesn't do anything when I run it.

ok. you dont need to set the variable
it would be
Between ([forms]![AVERAGE].[startdate] And [forms]![AVERAGE].[enddate]
 
It says I did not enter the And in the Between...And operator
 
can you post a sample so we can see what we are dealing with here?
 
Is there a way that I can get the dates onto the report from the query prompt instead of the form?
 
Not that i know of but

Between [forms]![AVERAGE].[startdate] And [forms]![AVERAGE].[enddate]

should work
 
how do I get a form to open up when I open a report.
 
In the context of this thread you should open the form, enter the criteria, select the command button to preview the report.

Brian
 
and brian and neil

you are welcome
happy to help
 

Users who are viewing this thread

Back
Top Bottom