G
Guest
Hi,
I have created a macro which seems to be working, but there are a few
problems. I want the macro to check if certain conditions exist and if they
exist , then I want a dialog box to pop up. The user has the option of
entering information into this dialog box. Upon closing the dialog box a
report is generated. If the conditions do not exist, then I do not want the
dialog box to pop up, and I want the report to run (this works). The
problem that I am having is that when the conditions exist the dialog box
pops up, but the report is being run before the dialog box is filled in (i.e.
it opens on top of the dialog box). In this case I don't really want to run
the report from this macro, I want the report to be run when the user clicks
OK on the dialog box.
The code for the macro is as follows:
Open Query (runs an update query to mark a field)
Open Form (opens a form in hidden view , so that I can check
criteria--probably a better way but I don't know it)
[forms]![NameOfForm]!"FieldName"="1" or "2" or "3" Open Form (this is the
dialog box)
Open Report
Thanks for any suggestions
I have created a macro which seems to be working, but there are a few
problems. I want the macro to check if certain conditions exist and if they
exist , then I want a dialog box to pop up. The user has the option of
entering information into this dialog box. Upon closing the dialog box a
report is generated. If the conditions do not exist, then I do not want the
dialog box to pop up, and I want the report to run (this works). The
problem that I am having is that when the conditions exist the dialog box
pops up, but the report is being run before the dialog box is filled in (i.e.
it opens on top of the dialog box). In this case I don't really want to run
the report from this macro, I want the report to be run when the user clicks
OK on the dialog box.
The code for the macro is as follows:
Open Query (runs an update query to mark a field)
Open Form (opens a form in hidden view , so that I can check
criteria--probably a better way but I don't know it)
[forms]![NameOfForm]!"FieldName"="1" or "2" or "3" Open Form (this is the
dialog box)
Open Report
Thanks for any suggestions