Tech Support Guy banner
Status
Not open for further replies.
1 - 5 of 5 Posts

· Registered
Joined
·
8 Posts
Discussion Starter · #1 ·
Hi,

I couldn't find it anywhere else, so I would like to ask If anyone knows how to close the form after VBA code has been executed? Is there is a special command just before "DoCmd.Close acForm, "form name"?

Cheers
 

· Registered
Joined
·
2,570 Posts
So I'm guessing your talking about MS Access (Docmd)....

DoCmd.Close will simply close the form that the code was initiated from, but be more specific about where the code is..a module or just from a form, what other events happen in between
 

· Registered
Joined
·
8 Posts
Discussion Starter · #3 ·
Sorry, yep it's Access. Code is inside the form, and is designed to open another forms and toolbars and go through the login process; therefore after it is done I don't need it to be open (it's just a start form).
 

· Registered
Joined
·
19,932 Posts
You may get an error like "cannot perform task while Form or Report is executing", which appears to be an Access bug, most of the time it doesn't happen but sometimes it does, even though the form can be closed with a command button using identical code.
 
1 - 5 of 5 Posts
Status
Not open for further replies.
Top