Pause macro until form closes

G

Guest

Access 2003: One of the steps in my macro opens a form. How do I pause
execution of the subsequent steps until the user closes the form? I've seen
the responses that reference a "timer", but that isn't applicable in this
case. I've also tried making the form "modal", but that doesn't affect macro
processing.

Thanks in advance for your help.
Dorci
 
G

Guest

suggestion:
You can try to split up your macro.
the first part of macro will open the form.
the second part of the macro can be assign to the close event of the form
 
G

Guest

Dan

I am very new to Access, forms, macros etc. I have a similar problem except
that I want to open 5 forms in sequence and only open the next one after each
previous one has been closed. How do I "split the macro" as you suggest below.

Actually you may have a suggestion for my real need. I have a normalized
database with "reference" (or dimension) tables and "fact" tables. I would
like to update all of the reference tables using a single form, with the
entry fields linked to different tables in the database. I would like to do
the same with the "fact" tables in a separate form. In each case, where there
is a PK to FK relationship I would like to set the default for the FK to the
last entered PK value. Is there any way that I can do this without masses of
programming?
 
G

Guest

As for pausing between forms, select the "acDialog" option for the WindowMode
parameter in the OpenForm method. (See syntax below.) The pros will have to
answer the remainder of your question.

expression.OpenForm(FormName, View, FilterName, WhereCondition, DataMode,
WindowMode, OpenArgs)
 
G

Guest

Dorci thanks for the help - it has definitely brought me further.

I am not using any VB code but simply the fields that show as options when
you select a macro in macro design view. One of the window options for
"OpenForm" is dialog which, based on your reply I used. It works fine BUT -
for some reason the windows that contain the form get fixed and you cannot
resize with a mouse. (The forms run outside of the macro come up as normal,
resizable windows). I need to be able to resize as it is important to look at
as much of the table as possible. Any ideas on this one? Thanks
 

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