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

  • Thread starter Thread starter Keith G Hicks
  • Start date Start date
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
 
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.
 
Back
Top