stephaniechongg
Registered User.
- Local time
- Today, 20:57
- Joined
- Feb 5, 2016
- Messages
- 15
I have set a prompt for the user's password before allowing the user to access the run query
I am facing difficulties running the query and i also have doubts of the view that users might see after they have ran the query. I know that you are able to use runsql but how do I go around it? :banghead:
i would appreciate your help!
Code:
Private Sub imgIncreasePayslipbyDept_Click()
Dim EnterStaffPosition As String
Dim strStaffPosition As String
EnterStaffPassword = InputBox("Enter your Staff Password", "Password Required")
If EnterStaffPassword <> "" Then
strStaffPosition = Nz(DLookup("[StaffPosition]", "[Staff_Chelsea]", "[StaffPassword]=" & Chr(34) & EnterStaffPassword & Chr(34)), "")
If strStaffPosition = "Store Manager" Then
[COLOR="red"]Docmd. run action query[/COLOR]
ElseIf strStaffPosition = "Supervisor" Then
[COLOR="Red"] Docmd. run action query[/COLOR]
Else
MsgBox "You are not a manager/supervisor!"
End If
End If
End Sub
I am facing difficulties running the query and i also have doubts of the view that users might see after they have ran the query. I know that you are able to use runsql but how do I go around it? :banghead:
i would appreciate your help!