how do I keep a form open but only process code after the form after a certain button on the form is

K

Keith G Hicks

Here's my problem:

Docmd.OpenForm "frmXX",,,,,acDialog, sSomeArgs
.. . . other code follows the form (this code is also used by other forms and
cannot be placed inside the form frmXX)

But I need the form frmXX to stay open after the user makes his selection so
I can't use acDialog. But I have to process a bunch of code AFTER the user
is done with the form (again, withoug closing frmXX).

I tried putting a sleep loop after the form is opened, but of course that
really botched things up.

Any simple suggestions? (other than completely rearranging the sequence of
the code).

Thanks,

Keith
 
R

Rick Brandt

Keith G Hicks said:
Here's my problem:

Docmd.OpenForm "frmXX",,,,,acDialog, sSomeArgs
. . . other code follows the form (this code is also used by other forms and
cannot be placed inside the form frmXX)

But I need the form frmXX to stay open after the user makes his selection so
I can't use acDialog. But I have to process a bunch of code AFTER the user
is done with the form (again, withoug closing frmXX).

I tried putting a sleep loop after the form is opened, but of course that
really botched things up.

Any simple suggestions? (other than completely rearranging the sequence of
the code).

Hide the form instead of closing it. That also causes your calling code to
resume. Since the form is still open you can still refer to it in your
code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top