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!

Total Field 1

Status
Not open for further replies.

CC801340

IS-IT--Management
Jul 10, 2001
147
GB
I have a Table called "DaysTimes" which contains the fields "Mon", "Tue", "Wed", "Thur", "Fri". The data type for each field is set to "Yes/No".

I have a report which displays the data and the yes/no values from each record.

At the bottom of the report I would like a "Totals" field to display the total number of "Yes" values for each field. What would be the best way to achieve this? I guess I just need a series of text boxes at the bottom of the report with the control source set to be "SELC COUNT..." but I cannot get the syntax correct!

Many thanks

 
Try text boxes with control sources of:
=Abs(Sum([Mon]))
=Abs(Sum([Tue]))

Duane
MS Access MVP
 
Thanks for that - however it just returns "#error" when I view the form.

 
=Sum(IIf([Mon]=-1,1,0)) and so on will hopefully work in your report.
 
"however it just returns "#error" when I view the form"
This is a reports forum. Is this a report or form?

Did you place the text boxes in the Page footer or Report footer. Page footer won't work. Group or Report footers will.

Duane
MS Access MVP
 
Many thanks for that - I was putting it in the page footer! It works ok in the report footer as you said.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top