Link to home
Start Free TrialLog in
Avatar of Jay Williams
Jay Williams

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jay Williams
Jay Williams

ASKER

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.