Hi.
The below code returns an error "invalid use of null". I don't see the problem, can you advise please?
I know it will be simple. Thanks.Code:tblDBUsers [ID] autonumber [UserName] text 50 characters Dim varUserID as long Watch : : varUserName : "Michael" : Variant/String : Form_frmLogIn.btnLogInFormClose_Click 'Return the ID number of the matching UserName varUserID = DLookup("[ID]", "tblDBUsers", "[UserName] = '" & varUserName & "'")