Its the Luddite again here, database is working ok but now want to add a few tweaks.
I only want certain people to be able to approve a quote and it almost works but when I add more than 1 ID I get a mismatch error.
This works fine:
Private Sub Approvedby_Click()
If Environ("USERNAME") <> "226709" Then
DoCmd.Requery
MsgBox "You are not authorised to approve this quote!", vbCritical
End If
End Sub
But when I add an 'Or' Element:
Private Sub Approvedby_Click()
If Environ("USERNAME") <> "226709" Or "226709" Then
DoCmd.Requery
MsgBox "You are not authorised to approve this quote!", vbCritical
the function works but I get the mismatch error.
Probably doing it wrong in the first instance so any help would be great
Luddite strikes again :-(
I only want certain people to be able to approve a quote and it almost works but when I add more than 1 ID I get a mismatch error.
This works fine:
Private Sub Approvedby_Click()
If Environ("USERNAME") <> "226709" Then
DoCmd.Requery
MsgBox "You are not authorised to approve this quote!", vbCritical
End If
End Sub
But when I add an 'Or' Element:
Private Sub Approvedby_Click()
If Environ("USERNAME") <> "226709" Or "226709" Then
DoCmd.Requery
MsgBox "You are not authorised to approve this quote!", vbCritical
the function works but I get the mismatch error.
Probably doing it wrong in the first instance so any help would be great
Luddite strikes again :-(