Check for design mode...

C

CyberDwarf

Hi y'all

Newbie question!!

How do I check for design mode in code in an Access form?
I need to do some cleaning up on the Close event of a form and avoid firing
the event if I switch into design mode.

Does this make sense???

All suggestions gratefully received....

Tia
 
B

Brendan Reynolds

I don't think you can. All of the form event procedures fire *before* the
form switches to design view, so any test you did in any of the form event
procedures would always return False.

You can write code to check whether another form is open in design view, but
not the form behind which your code is running. If the code is running, then
by definition the form is not in design view, as if it was in design view
the code would not be running. I'm afraid there isn't, as far as I am aware,
any indicator that would tell you the form is *about to be* in design view.
 
C

CyberDwarf

Thanks for your input Brendan.

I posted this after a day's headbangin....

After a night's sleep, I realized just how dumb a question it was!!!


Steve
 
B

Brendan Reynolds

There are no dumb questions ... well, OK, maybe there are, but this wasn't
one of them! :)
 
Top