Hi again.
I hate asking silly questions, but I can't ask anyone else at the moment. This will be another basic Q I'm sure.
The following DLookup gives me a "Data type mismatch in criteria expression" error. I can't see where...
Code:
Dim varUserID As Long
Dim varUserPassword As String
varUserPassword = DLookup("[Password]", "tblDBUsers", "[ID] = '" & varUserID & "'")
So that is...
Code:
string = dlookup ( string, table, [Long] long)
1 1 2 2
ID is a field in a table set to autonumber which is defined as Lond Integer.
Password is a field in a table set to text with [20] characters. It's also a Primary Key.
So 1 and 1 matches, 2 and 2 matches. Please educate me, where is the mismatch please?