N
Nat Sci
Hi,
Using Access 2003, I have an Autokeys macro which sets key F10 to shut down
the active form. However on one form I have some code in the Form_Unload
event which can cancel the unload and therefore the close of the form
(depending on certain conditions).
If I use F10 to close the form and the conditions cause the Cancel arguement
of the Unload event to be true, the Form_Unload code runs and then I get the
"Action Failed" dialogue box appearing for the F10 Autokey (with only the
"Halt" button enabled). Is there any way I can stop the "Action Failed"
dialogue box appearing?
I have tried adding SetWarnings commands to the macro, which didn't work. I
have tried a conditional StopMacro command as well, but this then stops the
entire close process, including the Form_Unload event.
I do have a boolean variable available in my Form_Unload code, but I don't
know how to access this from the macro.
Any suggestions greatly appreciated!
Using Access 2003, I have an Autokeys macro which sets key F10 to shut down
the active form. However on one form I have some code in the Form_Unload
event which can cancel the unload and therefore the close of the form
(depending on certain conditions).
If I use F10 to close the form and the conditions cause the Cancel arguement
of the Unload event to be true, the Form_Unload code runs and then I get the
"Action Failed" dialogue box appearing for the F10 Autokey (with only the
"Halt" button enabled). Is there any way I can stop the "Action Failed"
dialogue box appearing?
I have tried adding SetWarnings commands to the macro, which didn't work. I
have tried a conditional StopMacro command as well, but this then stops the
entire close process, including the Form_Unload event.
I do have a boolean variable available in my Form_Unload code, but I don't
know how to access this from the macro.
Any suggestions greatly appreciated!