Dcount problem. Gotta be something simple.

I have a tracking table that saves performance counts. The code runs without error, but each line (incorrectly) returns only 0 -- except in the one line that looks for today's date (line 2).  Looked at a bunch of examples, but can't see the problem,  Here's what I've got:
    rs.AddNew
    fldAddedToPickQueue.Value = DCount("*", "WorkingTasksQ", "DateEntered=Date()") '
    fldPlannerQueue.Value = DCount("*", "WorkingTasksQ", "[Plant]" = "HX01")
    fldPartsAddedStdLead.Value = DCount("*", "PartsAddedStdLeadQ", "[Plant]" = "HX01")
    fldPartsAddedShortLead.Value = DCount("*", "PartsAddedShortLeadQ", "[Plant]" = "HX01")
    fldReassigned.Value = DCount("*", "ReassignedQ", "[Plant]" = "HX01")
    fldInPlannerQueueMoreThan5Days.Value = DCount("*", "InPlannerQueueMoreThan5DaysQ", "[Plant]" = "HX01")
    fldEndPlannerQueue.Value = DCount("*", "TasksT", "[Plant]" = "HX01")
    fldReservationQueue.Value = DCount("*", "ReservationsQ", "[Plant]" = "HX01")
    fldConfirmedPicks.Value = DCount("*", "ConfirmedPicksQ", "[Plant]" = "HX01")
    fldEndReservationQueue.Value = DCount("*", "ClosedPicksNotInMB25Q", "DateClosed=Date()")
    fldHot1MachTstBldDwn.Value = DCount("*", "HotNowQ", "[Plant]" = "HX01")
    fldHot2NeededInNxt2Days.Value = DCount("*", "HotIn2DaysQ", "[Plant]" = "HX01")
    fldPastDue.Value = DCount("*", "PastDueQ", "[Plant]" = "HX01")
    fldStkdPrtsGrtrThn5Days.Value = DCount("*", "StkdPrtsGrtrThn5DaysQ", "[Plant]" = "HX01")
    fldNotStkdPrtsGrtrThn30Days.Value = DCount("*", "NotStkdPrtsGrtrThn30DaysQ", "[Plant]" = "HX01")
    fldPlant.Value = "HX01"
    rs.Update

Open in new window

These are the kinds of problems that keep us humble.
Jay WilliamsOwnerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
you have the " at the wrong place in the criteria part

fldPlannerQueue.Value = DCount("*", "WorkingTasksQ", "[Plant]" = "HX01")

should be

fldPlannerQueue.Value = DCount("*", "WorkingTasksQ", "[Plant] = "HX01"")

or, I prefer this

fldPlannerQueue.Value = DCount("*", "WorkingTasksQ", "[Plant] = 'HX01'")

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jay WilliamsOwnerAuthor Commented:
Yup, that did it.  Must be the only combo I didn't try (thought I did).  Don't you wish they were all that easy?  You da man.  Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.