gigifarrow
asked on
Using DCount to count certain fields in a table
I have a tabel that has a field called, DIV. In those fields are name of companies.
I need the total of certain companies that are in the DIV field. I am using an unbound field to put this information in.
So what Im trying to say is look in this table under div and find 190-HBCT and count how many times it appears. Then divide that number by 20 to get the total percentage completed by that unit.
=DCount("DIV","tblMODHisto ry","190-H BCT=-1")/2 0
=DCount("DIV","tblMODHisto ry","1CAV= -1")/20
I need the total of certain companies that are in the DIV field. I am using an unbound field to put this information in.
So what Im trying to say is look in this table under div and find 190-HBCT and count how many times it appears. Then divide that number by 20 to get the total percentage completed by that unit.
=DCount("DIV","tblMODHisto
=DCount("DIV","tblMODHisto
Is '190-HBCT' a field? if so, try enclosing it and also 'DIV' in brackets.
=DCount("[DIV]","tblMODHis tory","[19 0-HBCT]=-1 ")/20
=DCount("[DIV]","tblMODHis
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oops, as mbizup's answer shows, I forgot part of the argument in my response. Looks like either his answer or trbaze's would work for you depending on how you have your fields set up.
=DCount("*","tblMODHistory
=DCount("*","tblMODHistory