G
Guest
I have a several forms where I have set AllowEdits & AllowAdditions to False.
In order to edit or add records, I have created a pop-up form that prompts
the user for a password to edit. If the correct password is entered, the
pop-up gets hidden (me.visible = false) and I have the following code in the
OnCurrent Event of several forms:
If Not IsLoaded("frmPasswordPrompt") then
Me.AllowAdditions = False
Me. AllowEdits = False
Else
Me.AllowAdditions = True
Me.AllowEdits = True
End if
It works fine except since the password pop-up gets launched from a button
on the custom menu bar, the user has to move to the next record in order to
cause the OnCurrent Event to fire on the current form after entering the
password so that edits & additions will be allowed.
Is there a better way to handle this? Should I maybe also put this code in
the GotFocus event of the forms? Any suggestions are appreciated. I prefer
not to use Access security features. Thanks!
In order to edit or add records, I have created a pop-up form that prompts
the user for a password to edit. If the correct password is entered, the
pop-up gets hidden (me.visible = false) and I have the following code in the
OnCurrent Event of several forms:
If Not IsLoaded("frmPasswordPrompt") then
Me.AllowAdditions = False
Me. AllowEdits = False
Else
Me.AllowAdditions = True
Me.AllowEdits = True
End if
It works fine except since the password pop-up gets launched from a button
on the custom menu bar, the user has to move to the next record in order to
cause the OnCurrent Event to fire on the current form after entering the
password so that edits & additions will be allowed.
Is there a better way to handle this? Should I maybe also put this code in
the GotFocus event of the forms? Any suggestions are appreciated. I prefer
not to use Access security features. Thanks!