Chrafangau
Doing it wrong
- Local time
- Tomorrow, 00:55
- Joined
- Sep 9, 2013
- Messages
- 30
What would the best way to open a series of queries, if you aren't sure how many of those queries there are? I have the following:
Which continues as is for 10 or 11 queries named in a similar pattern, then prints a report. However, as the number of append queries is not set (they are generated in a different quantity for different purposes, it's complicated), I am not sure how to check how many there are with that style of name.
Code:
DoCmd.Close acReport, "SCEFReport"
DoCmd.OpenQuery "ClearTBLQuestions", acViewNormal, acEdit
DoCmd.OpenQuery "Q1append", acViewNormal, acEdit
DoCmd.OpenQuery "Q2append", acViewNormal, acEdit
DoCmd.OpenQuery "Q3append", acViewNormal, acEdit