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

Run same query "x" times

Status
Not open for further replies.

rogerarce

Technical User
Jan 24, 2002
57
CR
Hi all.
I need to know how I can run a query as many times as I need. Let's say I have a form where I have the following
fields:
[employee][timesabscent][cost]
I would need to run the query all times as [timesabscent] shows. Is this possible?

Thanks for your help.

Roger Arce
 
I am sure you know how to run a command in VBA multiple times so I think you are asking how to run a query from VBA.

One way is DoCmd.RunSQL wher eyou copy/paset the query form the query builder SQL section

Another way is along the lines of:
currentdb.QueryDefs("Query1").Execute (assuming the query is not a simple select query).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top