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

Can these series of update queries be combined into 1?

Status
Not open for further replies.

mvan

Technical User
Jul 1, 2003
2
US
I have run a series of update queries (a separate query for each month of the year)to "flag" people who are eligible each month. My series of queries look like the following except that obviously I replace Jan with Feb and the correct date range for each subsequent query. Rather than running 12 consecutive update queries can this be done in 1 query and achieve the same results?

Field: Jan EligBeginDate EligEndDate
Update To: "1"
Criteria: <=#1/31/2002# >=#1/1/2002#
 
No, there's no way to do this with one query. This is one of the unfortunate consequences of designing your table with separate columns for each month.

If instead your table's fields were MonthNum, Flag, EligBeginDate, and EligEndDate, with MonthNum being 1 to 12, you probably could have done this with one query.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Build a macro in MS Access to execute one update query after the other.
 
Thanks for confirming my suspicion. I appreciate your help on this one!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top