Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple query criteria expression in access

Status
Not open for further replies.
Joined
Jun 30, 2003
Messages
196
Location
GB
I have a query that returns all quotes. In the query there is a field called quote date. can anyone tell me a simple expression that will return all quotes that are within 182 day period of the current date. but not quotes that are more than the current date+182 or quotes that are less than the current date.

So a simple expression such as QuoteDate=<date()+182.

But ensuring that quotes less than the current date will not show.

Can anyone give me a simple expression to put into the criteria of the query to perform this required task.

Thanks
 
Hi DatabaseDesigner,

Does the solution I offered in thread702-598625 not do it?

Enjoy,
Tony
 
i dont understand that solution because the date is short format e.g 07/09/03 and i want a simple solution to find all quotes within the time bracket stated. im sure your solution does work but i was looking for a simpler expression. and im sure the syntax is similar to >Date()+182. But i only want quotes to show that are within this scale and not before or after.

Can u help
 
In design view - criteria row:
<=date()+182 and >=Date()
will do what you want
For a user specified date
<=[Enter Date]+182 and >=[Enter Date]

should do the trick

Rgds, Geoff
Si hoc legere scis, nimis eruditionis habes
Want the best answers to your questions ? - then read me baby one more time - faq222-2244
 
Hi DatabaseDesigner,

Sorry you didn't understand. Perhaps I didn't understand what you were saying either. [smile]

Geoff's solution is an expression to enter into the Query Design screen; mine was an expression to go into the SQL. Other than that they're equivalent. Both should work equally well.

Enjoy,
Tony
 
In other word's Tony gave you the technical answer - I gave you the &quot;graphical interface&quot; answer

Rgds, Geoff
Si hoc legere scis, nimis eruditionis habes
Want the best answers to your questions ? - then read me baby one more time - faq222-2244
 
yeah thats great. i was looking for the easier solution but thanks for the more advance option aswell im always looking to understand more things.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top