Hi June,
I'm getting error "Method or data member not found" although I have amended my code to look like this:lUser = Forms!frmLogin!cmbUser.Column(0)
If DLookup("AccessLevelID", "tblAccess", "UserID='" & Me.lUser & "'") <> 1 Then
If IsNull(DLookup("UserID", "tblAccess", "CategoryID=450")) Then
MsgBox "You are not authorized to view this form"
Cancel = True
Else
With Me
.DataEntry = True
.AllowEdits = True
.AllowDeletions = False
.AllowAdditions = True
.AllowFilters = False
End With
End If
End If
In my login query, userID is the first column hence column(0).