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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

End satement not working

Status
Not open for further replies.

hmstoo44dd

Programmer
Sep 27, 2002
32
0
0
US
Access 2002:

I am trying to use the end statement in the form load event to stop execution of all code/modules if the user id is not listed in a table. However, it just stops execution of the code in the load event and loads the form. I've never had this problem before in other VBA development environments. Any ideas?
 
If you want to close the form you should use
Code:
Unload Me
or
Code:
DoCmd.Close
 
Thanks everyone. DoCmd.Quit was exactly what I was looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top