N
niuginikiwi
Hi,
I've used Allen Browne's Locking bound control codes
(http://allenbrowne.com/ser-56.html) to prevent overwriting data accidentally
and it works fine.
After browsing the newsgroup, I now have this on the onClick event of
command button called cmdLock
Dim bLock As Boolean
If InputBox("Enter password!", "Password Required") <> "password" Then
Exit Sub
bLock = IIf(Me.cmdLock.Caption = "&Lock", True, False)
Me.cmdLock.Caption = IIf(bLock = True, "&UnLock", "&Lock")
Call LockBoundControls(Me, bLock)
This works ok but what happens is everytime I click cmdLock, it is prompting
for password. I only want the password prompt to happen when I am clicking to
UnLock but not to Lock.
How can I arrange the code above to get it only to password prompt when
UnLocking and not when clicking to Lock.
Thanks in advance
I've used Allen Browne's Locking bound control codes
(http://allenbrowne.com/ser-56.html) to prevent overwriting data accidentally
and it works fine.
After browsing the newsgroup, I now have this on the onClick event of
command button called cmdLock
Dim bLock As Boolean
If InputBox("Enter password!", "Password Required") <> "password" Then
Exit Sub
bLock = IIf(Me.cmdLock.Caption = "&Lock", True, False)
Me.cmdLock.Caption = IIf(bLock = True, "&UnLock", "&Lock")
Call LockBoundControls(Me, bLock)
This works ok but what happens is everytime I click cmdLock, it is prompting
for password. I only want the password prompt to happen when I am clicking to
UnLock but not to Lock.
How can I arrange the code above to get it only to password prompt when
UnLocking and not when clicking to Lock.
Thanks in advance