Strange glitch in form code

margt_a

Registered User.
Local time
Today, 05:37
Joined
Aug 15, 2002
Messages
35
Ok, I don't know what I managed to do. I had a bit of code on the On Close event of my main form that closed Access when the main form was closed (DoCmd.Quit or similar). I had it there to avoid a security hole.

It worked fine for a time, then I added an invisible command button to my form that opened another form. Suddenly, access quit whenever I switched into design view. I made the problem go away by deleting both DoCmd.Quit statements from the main form.

My question is, what was the trigger? Was it the new command button (there were many on the form already)? Or the notVisible property? Has anyone had this problem?

Margaret
 
"I had a bit of code on the On Close event of my main form that closed Access when the main form was closed (DoCmd.Quit or similar"
Doesn't switching to design mode "close" the form?
 
It never did until I added another command button... I had been into design view before that, and the application didn't close.

M.
 

Users who are viewing this thread

Back
Top Bottom