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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repeating records

Status
Not open for further replies.

airtabaki

Technical User
Aug 7, 2003
31
BE
I'm counting a total in the footer of my report. Because it is a total with special conditions and calculations I'm making it in VBA. Now I'm having problems with couting the totals: Every time I count these records two times. Now I've readen the manual and the forum and I've discovered that it is normal. Until now I work with a boolean or a division by 2 to repair this faults. Is there a more beautiful manner to solve this problem... First I thought formatcount was a solution but it doesn't seem to work.
 
I would attempt to create a bound expression in the control source rather than using code. For instance if you want to count all the females with red hair born before 1/1/1960:
=Abs(Sum([Gender]=&quot;f&quot; AND [Hair]=&quot;red&quot; AND DOB<#1/1/1960#)

If this doesn't work, create a duplicate text box, make it invisible, name it txtSumMe, set it Running Sum to Over All. Then add a text box to the report footer with a control source of:
=txtSumMe

Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top