cansevin
asked on
Look up value before
I am going to be using the below code for a very un-secure password that must be entered in order for an invoice price to be changed. The code is the invoice number minus 1,111 and then times two.
I believe I have to build a seperate query where the proper pass code will be stored, is that correct? If so, how to I write that sperate query? I believe that is the "vbOKOnly" section. I'm not sure where to properly tell it to look for the correct passcode. Thanks!
BeforeUpdate event of the Price control
If Me.SomeDate < Date() - 1 Then
If InputBox("Enter Password" <> "some string") Then
Cancel = True
Msgbox "Change not allowed without valid password.",vbOKOnly
Me.Price.Undo
Exit Sub
End If
End If
I believe I have to build a seperate query where the proper pass code will be stored, is that correct? If so, how to I write that sperate query? I believe that is the "vbOKOnly" section. I'm not sure where to properly tell it to look for the correct passcode. Thanks!
BeforeUpdate event of the Price control
If Me.SomeDate < Date() - 1 Then
If InputBox("Enter Password" <> "some string") Then
Cancel = True
Msgbox "Change not allowed without valid password.",vbOKOnly
Me.Price.Undo
Exit Sub
End If
End If
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys... works great! I have follow up question I need help with, I'll post that separately.
Open in new window
Regards,
-Naut