the most retarded question ever

jenntheblond

Registered User.
Local time
Today, 20:55
Joined
May 9, 2001
Messages
15
Anyone besides me could know this. I am trying to run a test to see if information matches up. If it doesn't, the user needs to go fix the problem, thus close the form "matching form" and go elsewhere. My problem is that I am BRAND SPANKING NEW to VBA (i'm trying to wean myself out of macros) and I can't figure out how to close my form. I used the
Docmd.Close acform "matching form" code but it gives me a run-time error and tells me I can't do that while processing an event. What? Help!
 
You don't need all that extra stuff after DoCmd.Close. It's just a button with DoCmd.Close as its Click event.

T
 
Yes it seems illogical at first but the form is still handling the event so it can't close it's self, create another form that looks like a message box add a label that says something like entry error or whatever, add another command button, caption OK, on it's event DoCmd.CloseForm1, DoCmd.CloseForm2 Make sure it's modal and pop up are set to yes.
HTH
 
Ok I see what you mean. I had a message box popping up, but I'll do a modal box instead that will allow me to close the forms. Thanks!
 
Jenn if you need to close another form then you will need: DoCmd.Close acForm, "frmScheduler" and not just DoCmd.Close
 

Users who are viewing this thread

Back
Top Bottom