Runtime errors on closing database

S

slickdock

I have forms in my mde that have macro events that occur upon unloading
and/or closing the form. I'd like all those macro events to cease if the user
closes the database before closing the form. Can I do that?

The problem is that the form in question (form B) checks for conditions on
other forms (i.e., form A) when it closes. But if the user skips directly to
closing the database before closing form B, I get errors that it can't check
for the value its looking for in form A (because form A I guess registers as
closed the second the user closes the database). So I'd like to kill all
procedures (except a normal save on a dirty form B) if the user closes the
database.

Hope this isn't too much for holiday brains filled with sugar and egg nogg!
 
D

Daryl S

Slickdock -

You could alter your macros to check for a form being open, and then only
perform the actions if say, form A was still open. It is hard from this end
to know what that will do to your application, as you didn't say what the
macros do. If it gets too complicated for a macro, you can convert the
macro to code and alter that to do what you want.
 

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