Using Between Dates in a Query

J

Joe Coulter

Hi
I have a chart which is based on a query "Qry_Mon_Perform"
In the query there is a date field "Date_Run".
When the user runs the charthe/she is asked to input following to askedto
input a date range for selection of data.
I have the following in the Criteria part of the query for the Date field
"Between [Enter Start Date] And [Enter End Data]
This works well when I run the Query. I have two questions:-

1. Why when I run the Chart, does it ask fot the Start and End Dates twice
before the chart will run?

2. How can I get the user to populate the Start and End Dates from two
Fields located on the Print Options form or a from a popup Calender which
pops up when the chart report is selected, instead of typing the dates in.

Any help would be gratefully appreciated

Thanks in advance

Joe
 
J

Joe Coulter

John

Thanks, works a treat, however I have noticed that sometimes the data shown
on the chart is not correct, I remember that in the Days of Access 97, the
chart sometimes displayed the wrong data, does the same problem exist with
2003?.

Anyway many thanks again

Joe

John W. Vinson said:
Hi
I have a chart which is based on a query "Qry_Mon_Perform"
In the query there is a date field "Date_Run".
When the user runs the charthe/she is asked to input following to askedto
input a date range for selection of data.
I have the following in the Criteria part of the query for the Date field
"Between [Enter Start Date] And [Enter End Data]
This works well when I run the Query. I have two questions:-

1. Why when I run the Chart, does it ask fot the Start and End Dates twice
before the chart will run?

2. How can I get the user to populate the Start and End Dates from two
Fields located on the Print Options form or a from a popup Calender which
pops up when the chart report is selected, instead of typing the dates in.

Any help would be gratefully appreciated

Thanks in advance

Joe

You can solve both problems in one step by changing the prompt parameters
[Enter Start Date] and [Enter End Date] to instead reference your print
options form:

BETWEEN [Forms]![PrintOptions]![txtStart] AND [Forms]![PrintOptions]![txtEnd]

using your actual form and control names of course. You can refer to a
Calendar Control instead of a textbox, but I think you would need two calendar
controls.
 
J

John W. Vinson

Thanks, works a treat, however I have noticed that sometimes the data shown
on the chart is not correct, I remember that in the Days of Access 97, the
chart sometimes displayed the wrong data, does the same problem exist with
2003?.

I have no idea what problem it is you're referring to. I didn't use charts all
that much though so there may be a well known problem (well known to others
but not to me!)
 
J

Joe Coulter

No Problem John, Its just me rambling on again, lol

Thanks for your help, much appreciated

Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top