please i have an issue with my dlookup, i want my dlookup to run through a table and check if a name exist in the table before carrying out and action, but it seems to be working on one name at a time and it won't work on another name except i remove the first name from the table, then another name will work.
If Forms!PASSWORDS!Text43.Value = DLookup("USERNAME", "AUTHORISATION") Then
DoCmd.SetWarnings True
DoCmd.RunSQL thequery
DoCmd.SetWarnings False
DoCmd.RunSQL thequery2
Forms![PAYTEMP2].Requery
Else
MsgBox "You have no permission for this", vbOKOnly, _
"mindBASE!"
End If
If Forms!PASSWORDS!Text43.Value = DLookup("USERNAME", "AUTHORISATION") Then
DoCmd.SetWarnings True
DoCmd.RunSQL thequery
DoCmd.SetWarnings False
DoCmd.RunSQL thequery2
Forms![PAYTEMP2].Requery
Else
MsgBox "You have no permission for this", vbOKOnly, _
"mindBASE!"
End If