Updating a Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query in Access 2002 which returns the results of all tests taken >=
a certain date. At the beginning of each month I go into my query and update
the criteria date in 7 different fields manually (in the same query) so that
it returns the results i want. I would like the query to update
automatically taking its information from the system clock. Your help will
be much appreciated.
 
The Date() function returns the current date value. Without more information
from you, that's all the help that can be provided without making a WAG.
 
I have a query in Access 2002 which returns the results of all tests taken >=
a certain date. At the beginning of each month I go into my query and update
the criteria date in 7 different fields manually (in the same query) so that
it returns the results i want. I would like the query to update
automatically taking its information from the system clock. Your help will
be much appreciated.

You can use the Date(), DateAdd(), and DateSerial() functions to
return the dates you want.

Since you have not indicated what dates you DO want, for example by
posting the criteria you are now using, I can't suggest *how* you
would use those functions, but I can suggest that you should do so.


John W. Vinson[MVP]
 
Sorry Duane I am new to all this.

I have created a normal query from a table in access 2002. The query
returns the results of all tests taken within a given month (test dates
entered into a form. I go into the Query and update it manually at the
begining of each month so that it returns all tests taken during the month.
The query looks something like this:

Field: Surname Module 1 Module 2 Module 3
etc
Table: Modules Modules Modules Modules
etc
Sort:
Show:
Criteria: >=01/09/05
or: >=01/09/05
=01/09/05

I was wondering if there was anyway that I could get the dates in the query
to upddate automatically on the first of each month without me having to open
it up and manually enter the date for the next month ie 01/10/05

I am sorry I find it hard to explain as I am trying to teach myself access
and am just getting to grips with the basics at the moment
 
You can set the criteria expressions to
=DateSerial(Year(Date()), Month(Date()), 1)

Having fields with names like "Module X" suggests an unnormalized database
structure but that would be another thread.
 
Back
Top