pledbetter
Registered User.
- Local time
- Today, 15:59
- Joined
- Feb 20, 2012
- Messages
- 16
I have an application called "MCLAP4". In the Access Options-Current Database-Application Options, I have the "Display Form:" set to "login screen". That is an existing form that works fine. On one of my forms, I have an "Exit" command button. The "On-Click" property of that form is the following VBA code:
Private Sub Command3_Click()
DoCmd.Quit acQuitSaveAll
End Sub
When I run the application as an application, and I click the "Exit" button, I get the following error: "MCLAP4 cannot find the referenced form 'login screen'.
When I run the application from design mode, starting from the form "login screen", and then go to the form with the Exit button, and then click that same Exit button, I get no such error, and Access exits cleanly.
Why does the same code behave differently depending on how Access is run, how can I get it to exit cleanly in application mode, and why is it looking for this form? By the way, I even loaded the form "login screen" in hidden mode and I still got the same symptoms.
Attached is a screen shot of the error
Private Sub Command3_Click()
DoCmd.Quit acQuitSaveAll
End Sub
When I run the application as an application, and I click the "Exit" button, I get the following error: "MCLAP4 cannot find the referenced form 'login screen'.
When I run the application from design mode, starting from the form "login screen", and then go to the form with the Exit button, and then click that same Exit button, I get no such error, and Access exits cleanly.
Why does the same code behave differently depending on how Access is run, how can I get it to exit cleanly in application mode, and why is it looking for this form? By the way, I even loaded the form "login screen" in hidden mode and I still got the same symptoms.
Attached is a screen shot of the error