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

Enter a filter one time for multiple queries

Status
Not open for further replies.

Sepie

Technical User
Sep 12, 2002
13
US
I have 3 MS Access queries I run routinely that all have the same date as the filter. Is there a way to enter this date only once for all three queries.

Thanks
Sepie
 
-> all have the same date as the filter

Are they all pulling for the previous day/week/month etc.?

If so, you can make the criteria a function that will calculate the start/end dates dynamically.

Please provide more info about your needs.


Also, for future reference, there are a few Access-specific forums here on Tek-Tips.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
It is always for the previous month. You have pointed me in the right direction.

Thanks John.
 
No problem. If you need any help coming up with the function, just let us know.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Actually, I happen to be in a database right now where I do this.

The tricky part you need to look out for is January pulling info back for December of the following year.

Here's what I use:
Code:
>=Month(DateAdd("m",-1,Now())) & "/01/" & Year(DateAdd("m",-1,Now())) And <=Int(Now()-Day(Now()))+1
Now I'll just wait to see if someone comes along and offers a more elegant solution....

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top