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

Pausing code 1

Status
Not open for further replies.

Joey4Js

Technical User
Sep 5, 2002
9
0
0
AU
Hi everyone,

Sorry if this is an easy one but my little Einstein guy is not working at the moment.

Anyway, what I would like to do is have my code pause and open a new form. I then click a button on that new form and, depending on what the button is, my code then goes on its merry way. I am sure this is possible, but I'm lost when it comes to gotos and such.

Thanks,

Joe
 
Hi,

You don't say why you want a pause!

It matters - how long i.e.?

You can use the timer on a form, or you can use a VB loop to do delay:

for x = 1 to 20000000000
doevents 'allows other Windows actions to occur such
'as running a form
next x

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
 
Thanks Darrylle,

What I want to do is interrupt stop my code, fill in all the boxes on my new form that I open, click the command box to finish, and then return to my first form and resume my code from where I left off, with new instructions that depend on what I put on the second form.

I hope that makes things more clear.

Joe.
 
Joe,

Open the form in dialog mode by using the following code:

DoCmd.OpenForm "YourFormName", , , , , acDialog

An code follwoing this line will not be run until the form is closed.

Good luck!

Anthony J. DeSalvo
President - ScottTech Software
"Integrating Technology with Business"
 
That's pretty much exactly waht I needed.

Thanks Anthony.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top