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

How to Eliminate "[Enter Start Date] And [Enter End Date]" x4

Status
Not open for further replies.

PWD

Technical User
Jul 12, 2002
823
0
0
GB
Good afternoon, I have inherited a query that prompts for start and end period dates. Now, right or wrong, I would normally just hard-code these in a query (because when I'm learning about what a query does and how it works, I'll be swapping between Design and Output modes) but in this case there are 4 lines of "or" criteria. Is it possible to have just one place where I can hard-code the required dates and then reference this within those criteria lines? It drives me nuts having to enter these dates each time when I'm figuring out the query.

Many thanks,
D€$
 
If there is a series of queries with the same parameters, you can build one row table with dates and add it to query without linking.
4 lines with criteria may be hard to handle, sometimes it is easier to add helper fields with formulas that return TRUE or FALSE with one line criteria set tu TRUE (or FALSE).


combo
 
Hi Duane, I've successfully created a Form and Start & End boxes as outlined in your FAQ; however I still have to enter those dates every time I run the Query, despite having given them both Default Values and input masks. Is there any way that I could populate them once, at least for when I'm 'testing' the query?

Many thanks,
D€$
 
If your form stays open you only need to enter the values once. I guess I don't understand your current application and how you are using the values.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
PWD,

Did you modify your query to look at the Start/End dates on the new form for all 4 critieria?

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top