I used the below code which I received from another answer here to check that a UserID present in a my database and that works fine.
If IsNull(DLookup("StudentNumber", "tblSecurity", "[StudentNumber]=" & Me.txtUserID & "")) Then
I need to know how to adapt this to check that both the password and the userid match, and also I want to be able to retrieve a value from another field in the table (accesslevel - numeric value).
Probably not too hard but i'm setting the points a bit higher because it's quite urgent.
Thanks for your help
Arron
You could be better off using a recordset to do more than one field
dim rs as dao.recordset
set rs = currentdb.openrecordset("S
if (rs.bof and rs.eof) then
'entry not found
else
intAccessLevel = rs("AccessLevel")
endif
or you can use the dlookup...
IsNull(DLookup("AccessLeve
regards
jack