Date Range Query

G

Guest

What is the magicial function or expression that returns records based upon
user input dates? The between [date] and [date] does not work. However, when
no expression is entered in the critiera, the results are good. I simply want
the user to enter a date and have the query return results for the previous 5
days. ie. "Show me all orders that ship this week"
Thanks All,
Mike
 
J

Jeff Boyce

"Between [first date] And [second date]" works for me.

Are you literally using the word "date" in your parameter? This is a
reserved word in Access, and may confuse both you and Access.

Copy what you are using from the query (you're working in a query, right?)
and post it back here.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
G

Guest

Hi Jeff,
This is my query parameter - Between [Enter Date] And [Enter Date]

Jeff Boyce said:
"Between [first date] And [second date]" works for me.

Are you literally using the word "date" in your parameter? This is a
reserved word in Access, and may confuse both you and Access.

Copy what you are using from the query (you're working in a query, right?)
and post it back here.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/

mike said:
What is the magicial function or expression that returns records based upon
user input dates? The between [date] and [date] does not work. However, when
no expression is entered in the critiera, the results are good. I simply want
the user to enter a date and have the query return results for the previous 5
days. ie. "Show me all orders that ship this week"
Thanks All,
Mike
 
J

Jeff Boyce

If you use the same prompt for both, you only get one value. Use two
different prompts...

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/

mike said:
Hi Jeff,
This is my query parameter - Between [Enter Date] And [Enter Date]

Jeff Boyce said:
"Between [first date] And [second date]" works for me.

Are you literally using the word "date" in your parameter? This is a
reserved word in Access, and may confuse both you and Access.

Copy what you are using from the query (you're working in a query, right?)
and post it back here.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/

mike said:
What is the magicial function or expression that returns records based upon
user input dates? The between [date] and [date] does not work.
However,
when
no expression is entered in the critiera, the results are good. I
simply
want
the user to enter a date and have the query return results for the previous 5
days. ie. "Show me all orders that ship this week"
Thanks All,
Mike
 
J

Jan Kowalski

U¿ytkownik "mike said:
What is the magicial function or expression that returns records based
upon
user input dates? The between [date] and [date] does not work. However,
when
no expression is entered in the critiera, the results are good. I simply
want
the user to enter a date and have the query return results for the
previous 5
days. ie. "Show me all orders that ship this week"
Thanks All,
Mike
 
J

Jan Kowalski

U¿ytkownik "mike said:
What is the magicial function or expression that returns records based
upon
user input dates? The between [date] and [date] does not work. However,
when
no expression is entered in the critiera, the results are good. I simply
want
the user to enter a date and have the query return results for the
previous 5
days. ie. "Show me all orders that ship this week"
Thanks All,
Mike
 
J

Jan Kowalski

U¿ytkownik "mike said:
What is the magicial function or expression that returns records based
upon
user input dates? The between [date] and [date] does not work. However,
when
no expression is entered in the critiera, the results are good. I simply
want
the user to enter a date and have the query return results for the
previous 5
days. ie. "Show me all orders that ship this week"
Thanks All,
Mike
 

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