Select Date For Query

G

Guest

I've got a database to monitor downtime and production levels. Just now I
have queries that will show information for 'today', the last seven days and
the last 31 days. I'm now trying to create queries that will allow me to
select the dates i want to view the data from/on. For example view data
between 31/08/07 and 05/09/07, or view data on 06/09/07. The fields I have
are:

Date Occurred - Date/Time
Time Occurred - Date/Time
Shift - Text
Machine Number - Text
Fault Code - Text
Fault Message - Text

These are all stored in the table Data - Downtime.

Thanks for the help

Tommy
 
G

Guest

you'll need 2 queries. 1 for a single date and another for a period of time.
I would use a form and enable the user to select dates (possibly with a
calendar) and display those dates in text boxes (you'll need to code that bit
urself, but its easy). Then have 2 buttons depending on which query needs to
be used. the query for a single date i think u already know. the query for a
period of time only needs to have "between date1 and date2" in the criterea
of your "date occured" field. you can grab the necessary dates from the text
boxes on your form where the dates are already displayed.

hope this helps.
 
G

Guest

Thanks I've got that working now. Not put it in a form yet will probably do
that though. The way I've got my other queries set up I only look at a
certain shift in each query, there are four shifts - D, E, F, G. I can't get
this to work in this query. Will it let me do this?
 

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