Date Query Help Please

P

Peter W S

Hello and thanks in advance to anyone who can help me.

I am writing a query using Access 2000 where I need to query between two
dates which are input by the user. The basics of the query is

* User Input * Enter Registration Number
* User Input * Enter Date To Query From
* User Input * Enter Date To Query To
* Query Output * Results

So when the query is run is will ask for the Registration number, then the
dates.

I can remember doing this with Access 97, but for some reasons I think the
syntax has changed from Access 2000 inwards.

As I am the only person in the office who understands SQL there is no point
in writing in that language and I have to make it simple for everyone else.

Again, many thanks in advance for help

P W S
 
V

Van T. Dinh

SELECT *
FROM [YourTable]
WHERE ([RegIDField] = [Enter Registration Number:])
AND ([DateField] BETWEEN [Enter Start Date:] AND
[Enter End Date:])

When the Query is run, Access will ask for Reg No. then Start Date then End
Date.
 

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