Hi this code I have may cause the user to enter a password which is stored in a table. The only problemis that the user can open the database objects. I have not figured that out as of yet.
Here is the code for the users form where a combo box has the user names and they have to type in the correct password.
Private Sub cmdLogin_Click()
If UserPassword = DLookup("UserPassword", "tblUsers", "[UserID] = " & Forms![frmUsers]!cboUserName.Column(0)) Then
Beep
Beep
DoCmd.Close acForm, Me.Name
Else
MsgBox "Wrong Password-Try again"
UserPassword = ""
UserPassword.SetFocus
End If
End Sub
If this form can be the Start up form, perhaps there is a way that the database wndow will not be displayed? I haven't figured that out yet.
Rob