DCount with multiple criteria

Lkwdmntr

Registered User.
Local time
Today, 00:15
Joined
Jul 10, 2019
Messages
315
Can anyone see what I'm doing wrong with this one?

Code:
DCount("[WeeklyPlanID]", "tblWeeklyPlans", "[UserIDFK] = " & lngUserID & " AND [StatusFK] <> " & 'New')

I tried the New in double-quotes too.
 
Can anyone see what I'm doing wrong with this one?

Code:
DCount("[WeeklyPlanID]", "tblWeeklyPlans", "[UserIDFK] = " & lngUserID & " AND [StatusFK] <> " & 'New')

I tried the New in double-quotes too.
Maybe try it this way.

Code:
DCount("*", "tblWeeklyPlans", "[UserIDFK] = " & lngUserID & " AND [StatusFK] <> 'New'")
 

Users who are viewing this thread

Back
Top Bottom