Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count field as a variable

Status
Not open for further replies.

lr999

Technical User
May 16, 2011
30
US
I have a field with 0 or -1 value, I need to add a count for this field on a report. Can you provide a sample of vba code for this variable
 

If the field has a value of 0 or -1, it sounds like a yes/no field. What do you want to "count" ?


Randy
 


"Yes!" we have "No" banannas!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
sum([fieldName]) * -1 : total true records
sum([fieldName] + 1) : total false records
count([fieldname]) : total records
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top