Can someone tell me what's wrong with this? These are so confusing. I never know when to put the quotes and when not to.
I'm getting a data type mismatch in criteria expression error 3464
The UserID field is a Long in the DB and the other two are Integers.
Code:
DLookup("[WeeklyPlanID]", "tblWeeklyPlans", "[UserID] = " & Me.txtUserID & " AND [Loop] = '" & loopNum & "' AND [WeekNumber] = '" & weekNum & "'")
I'm getting a data type mismatch in criteria expression error 3464
The UserID field is a Long in the DB and the other two are Integers.