i have designed a form that looks up passwords in a table and enables a user to log in using the following VBA.
Private Sub Combo0_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Name] = '" & Me![Combo0] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Command4_Click()
If Text2 = Password Then DoCmd.RunMacro ("mcropenarchivefrm")
2 questions,
(1) First i want to be able to log only administrators so that they can only see the admin side and the user just use the sales
(2) Once the user has logged in i want the form to close
Please Help!!!
Private Sub Combo0_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Name] = '" & Me![Combo0] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Command4_Click()
If Text2 = Password Then DoCmd.RunMacro ("mcropenarchivefrm")
2 questions,
(1) First i want to be able to log only administrators so that they can only see the admin side and the user just use the sales
(2) Once the user has logged in i want the form to close
Please Help!!!