DCount syntax for multiple criteria with a checkbox (1 Viewer)

Lkwdmntr

Registered User.
Local time
Today, 07:12
Joined
Jul 10, 2019
Messages
281
Hi guys, I'm a little rusty on the syntax for multiple criteria.

I need the number of records that have the Plan ID of "Me.txtWeeklyPlanID" with the ActionIncluded = True and the ActionIDFK = 3

This is the code I use, but I get an "Expected list separator" error.

Code:
DCount("[ActionIDFK]", "tblActionsPerWeeklyPlan", "[WeeklyPlanIDFK] = " & Me.txtWeeklyPlanI & " AND [ActionIncluded] = True AND ActionIDFK = 3)

Any help would be appreciated.
 

ebs17

Well-known member
Local time
Today, 16:12
Joined
Feb 7, 2020
Messages
1,949
... & " AND [ActionIncluded] = True AND ActionIDFK = 3")
 

Lkwdmntr

Registered User.
Local time
Today, 07:12
Joined
Jul 10, 2019
Messages
281
... & " AND [ActionIncluded] = True AND ActionIDFK = 3")
Code:
DCount("[ActionIDFK]", "tblActionsPerWeeklyPlan", "[WeeklyPlanIDFK] = " & Me.txtWeeklyPlanID & " AND [ActionIncluded] = True AND [ActionIDFK] = 3")

Now I'm getting an = sign is expected
 

Lkwdmntr

Registered User.
Local time
Today, 07:12
Joined
Jul 10, 2019
Messages
281
Nevermind, I was using the "Immediate Window" without using the ?
 

Users who are viewing this thread

Top Bottom