A
acores
Hello.
I have a Inputbox requesting a password to the user, in the following code:
Function New_Area()
Dim pass As String
pass = InputBox("Enter de code, please.", "Password", "123")
If pass = "123" Then
DoCmd.OpenTable "Area"
Else
MsgBox "Password not valid. Please try again.", , "Password"
Exit Function
End If
End Function
My question is: the inputbox has 2 buttons: OK and Cancel, but both do the
same, I mean, If I click OK or Cancel the code runs. My goal is that if the
user click Cancel, the code is cancelled. Is it possible?
Another question is: is possible the user enter de password as ****, using
this function?
Thanks in advance for all the help.
Best regards.
I have a Inputbox requesting a password to the user, in the following code:
Function New_Area()
Dim pass As String
pass = InputBox("Enter de code, please.", "Password", "123")
If pass = "123" Then
DoCmd.OpenTable "Area"
Else
MsgBox "Password not valid. Please try again.", , "Password"
Exit Function
End If
End Function
My question is: the inputbox has 2 buttons: OK and Cancel, but both do the
same, I mean, If I click OK or Cancel the code runs. My goal is that if the
user click Cancel, the code is cancelled. Is it possible?
Another question is: is possible the user enter de password as ****, using
this function?
Thanks in advance for all the help.
Best regards.