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

Using criteria in multiple queries

Status
Not open for further replies.

camiller

IS-IT--Management
Jan 20, 2002
8
AU
Hi,

I have several queries that I need to run one right after the other. Three of the queries require a date input that I have set through a criteria. Each one requires the same date. Is there a way to enter the date once and have it be used with each of the queries?

Thanks, Camiller
 
In Standard Module.
Public datevar as date

Public Function ReturnDate() as Date
ReturnDate = datevar
End Function

In your queries.
select * from tab where mydate = ReturnDate()

In your Form in afterupdateevent of the date text field
datevar = Me.Txtdate

execute the queries.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top