In order to provide some security, i set a way to destroy the database if certain condition is not met.
The first form opened by the database is a popup login form, asking for a password.
If the password is good, the following VBA commands are executed:
DoCmd.Close acForm, "LoginPass_Popup_Frm"
DoCmd.OpenForm "Main_Menu"
On the OnLoad event of Main Menu, if a certain condition is not met, all tables, queryes, reports, modules and forms should be erased.
The odd issue appears when i tried to delete all 80 forms
Everything is deleted, except the two forms mention above: "LoginPass_Popup_Frm" and "Main_Menu"
Since the delete call is launched from inside "Main_Menu" form, it is obvious that this one cannot be deleted.
But i don't understand why I can't delete the "LoginPass_Popup_Frm" form
To delete the forms, i used the simplest way:
DoCmd.DeleteObject acForm, "LoginPass_Popup_Frm"
What can keep this form out of deletion ?
to be sure the form is closed, i added a DoCmd.Close command in the OnOpen event of "main_menu", but "LoginPass_Popup_Frm" still cannot be deleted.
Any advice?