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

Stopping a Macro

Status
Not open for further replies.

BruceJackson

Technical User
Apr 30, 2003
29
GB
I have a macro - M1 with a macro nested within it - M2.

M2 runs an Append query. I want M2 to repeat an infinite no of times until a condition is met. The condition is a query field returning a specific value "0".

How do I do this in M1 using the Repeat Expression box for the M2 macro?

Many thanks,

Tax and MOT.

 
I would suggest writing this in VBA instead. Something like this:

Code:
Private Function UpdateData()

Do While nz(Dlookup("[QueryField]","QueryName"),1) <> 0
  DoCmd.OpenQuery "AppendQuery"
Loop

End Function

No you can use the RunCode option in Macro 1.

I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top