May 24, 2011 #1 lr999 Technical User Joined May 16, 2011 Messages 30 Location 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
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
May 24, 2011 #2 randy700 Programmer Joined Sep 25, 2003 Messages 2,384 Location US If the field has a value of 0 or -1, it sounds like a yes/no field. What do you want to "count" ? Randy Upvote 0 Downvote
If the field has a value of 0 or -1, it sounds like a yes/no field. What do you want to "count" ? Randy
May 24, 2011 #3 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US "Yes!" we have "No" banannas! Skip, Just traded in my old subtlety... for a NUANCE! Upvote 0 Downvote
May 24, 2011 #4 MajP Technical User Joined Aug 27, 2005 Messages 9,382 Location US sum([fieldName]) * -1 : total true records sum([fieldName] + 1) : total false records count([fieldname]) : total records Upvote 0 Downvote
sum([fieldName]) * -1 : total true records sum([fieldName] + 1) : total false records count([fieldname]) : total records