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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specify Number after Parameter

Status
Not open for further replies.

Bass71

MIS
Jun 21, 2001
79
Hi;

I'm trying to create a query that outputs a group of dates 21 days prior to the date specified in parameter.

In the criteria field, I'm trying to write something like..

[Enter Date Inquiry Sent]-21

Thank you..........RO

 
Though most would recommend against using parametric queries, opting for criteria to be specified in a form instead, here is a potential answer:

Code:
SELECT t.[YourDateField]
FROM tblYourTable t
WHERE ((DateDiff("d",[YourDateField],[Enter Date Inquiry Sent])=21));

(typed, semi-tested)


~Melagan
______
"It's never too late to become what you might have been.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top