PDA

View Full Version : Input Box for Password input



ronakj16
02-11-2019, 12:34 PM
Hello

I am using following code for asking user to input password to give some access-

Code-
Public Function Check_Security_Password() As Boolean
Dim inputstring As String
inputstring = InputBox("Enter Password")
If inputstring = "5555" Then
Return True
ElseIf inputstring = "" Then
Return False
Else
MsgBox("!!! Wrong Password !!!")
Return False
End If
End Function

Code is running fine. However is it possible for INPUTBOX to take user input password in "xxxxx" format to keep password secure ?

OBP
02-11-2019, 01:17 PM
It is actually better to use a Form with an input field as that can be set to Password Format.
I have a database with a Password input and Verification and it also has a change password function as well.
You are welcome to a copy if you want.

ronakj16
02-11-2019, 11:42 PM
Thanks OBP.

Can you Provide me link for that Code !!

OBP
02-12-2019, 02:26 AM
It is not as simple as just code as it also uses a Public Variable which once set by the password routine can then be used anywhere in the database, ie to allow access to forms and record what users do with the data etc.
So here is a copy of the database with the tables and forms that control the users and their passwords.
There are Modules in it with useful VBA code as well.
There is also the basis for recording who makes what entries in the database including changes to data already entered.
When the database opens Select Administrator and enter tony as the password and it will open a dummy form called First Form.