DCount with multiple criteria (1 Viewer)

Lkwdmntr

Registered User.
Local time
Today, 01:01
Joined
Jul 10, 2019
Messages
281
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.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:01
Joined
Oct 29, 2018
Messages
21,542
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

Top Bottom