S
Shaun E via AccessMonster.com
Right I have spent the whole of today looking for this. I would like my
database to check if the user currently logging in has a password, if not i
would like a form to open which prompts the user to enter and verify a
password. I know how to create an unbound form where passwords can be changed.
The problems I am experiencing is trying to check if the user has a password
it not. I have created a form which loads at startup where the user can add a
password to their logon details. This form loads when the DB is started up.
This is the code I have in the form on open action:
Private Sub Form_Open(Cancel As Integer)
Dim U As User
If U.Password = "" Then
MsgBox "To ensure this database is secure you are required to enter a
password in the following form" & vbCrLf & " " & vbCrLf & "Please enter a
secure password", vbCritical, "Total Building Response"
Me.txtNew.SetFocus
Else
DoCmd.Close acForm, "PassCheck", acSaveNo
End Sub
The error I am getting is that I am using the password function incorrectly.
Any help would be very much appreciated!!!
database to check if the user currently logging in has a password, if not i
would like a form to open which prompts the user to enter and verify a
password. I know how to create an unbound form where passwords can be changed.
The problems I am experiencing is trying to check if the user has a password
it not. I have created a form which loads at startup where the user can add a
password to their logon details. This form loads when the DB is started up.
This is the code I have in the form on open action:
Private Sub Form_Open(Cancel As Integer)
Dim U As User
If U.Password = "" Then
MsgBox "To ensure this database is secure you are required to enter a
password in the following form" & vbCrLf & " " & vbCrLf & "Please enter a
secure password", vbCritical, "Total Building Response"
Me.txtNew.SetFocus
Else
DoCmd.Close acForm, "PassCheck", acSaveNo
End Sub
The error I am getting is that I am using the password function incorrectly.
Any help would be very much appreciated!!!