Hey all,
I'm unsure as to how to catch this error -- when using a dlookup function to find a user_id to match up records in another dlookup function, it works fine unless there is no record to match.
Here is the line:
intUserID = DLookup("[user_id]", "[tblUsers]", "[user_login] = '" & strProvidedLogin & "'")
Now that will work fine if the strProvidedLogin matches something in the tblUsers table, but produces an Invalid Use of Null error if there is no match. How do I get around this?
I'm trying to make my own login form from scratch
Thanks!
I'm unsure as to how to catch this error -- when using a dlookup function to find a user_id to match up records in another dlookup function, it works fine unless there is no record to match.
Here is the line:
intUserID = DLookup("[user_id]", "[tblUsers]", "[user_login] = '" & strProvidedLogin & "'")
Now that will work fine if the strProvidedLogin matches something in the tblUsers table, but produces an Invalid Use of Null error if there is no match. How do I get around this?
I'm trying to make my own login form from scratch

Thanks!