Change query dates

D

Danu

I have an Access 2003 database with many tables. For each table there is a
query requesting data between specific dates. I will be changing the dates
for each of these queries several times during the month. Is there a way to
globally change the dates in each query or do I need to go into each query
and change the dates?

Thank you.
 
R

Ron2006

I have an Access 2003 database with many tables. For each table there is a
query requesting data between specific dates. I will be changing the dates
for each of these queries several times during the month. Is there a way to
globally change the dates in each query or do I need to go into each query
and change the dates?

Thank you.

Some more information would be helpful..........


Here are three methods that would work but depend greatly on how you
are executing these queries.

1) In the criteria for each of the queries, instead of having #mm/dd/
yyyy# for the criteria, change the that part to something like:
[Enter the starting Date: ] for the starting date and
[Enter the Ending Date: ] for the ending date

That was is bad in the sence that the dates will have to be entered
each time for each query.

2) Create a form on which you request the dates. Then change each of
the queries to point to that form for the start and end date. In the
criteria put
Forms![Form for dates name]![Startdatefieldname] for the
start date
Forms![Form for dates name]![Enddatefieldname] for the ending
date.

This is cleaner BUT requires that the queries be execute from that
form.

3) Create a form that is opened before the main menu is opened. On
that form request the from and to dates and have a close button with
instructions on that form that say if the dates are NOT proper then
the information that will be seen will be incorrect. Then on that
"close button" instead of closing the form, simply make it hidden
(me.visible = false) and open the main menu or whatever you are using
as a main menu type of form. Then change all of the queries to use
the same type of criteria as number 2 above but change the name to the
form referenced.

Hope this gave you some ideas.

Ron
 

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

Similar Threads

Between Criteria 1
User Prompt for Month to find Date Range 3
Query Design 1
Excel Display certain dates 9
Dcount returning no results!!! 0
Update Query Help 5
Complex query 0
Between Dates Parameter Query 13

Top