Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing form while processing event

Status
Not open for further replies.

Orcanut

Programmer
Sep 3, 2002
24
CA
A control button opens a form which inturn processes a series of events at the end of which I would like the form to close.

If I put DoCmd.Close acForm, " " in the last line of button click event of the control button I get an endless loop I have to close with Pause break.

If I put DoCmd.Close .... at the end of an event in the opened form I get error message, " This action can't be carrier out while processing a form or report event"

How do I close this form?

Thanks.
 
Try this:

Perform event1...
Perform event2...
Perform event3...

DoEvents
DoCmd.Close
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top