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!

Having trouble Summing a unbound text box on subform 1

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
Having trouble Summing a unbound text box on subform

If the Overtime check box (a “Yes/No” field) is checked I want to add those hours.
I have this in the textbox:
Name of text box: txtOTHours
Control source: =IIf([overtime]=True,[Hours],0)
This works great, it shows the hours if someone checked the overtime box and nothing if the check box is empty.

The issue is Summing in the footer, I put a textbox in the footer with this:
name: SumOTHours
control source: =Sum([txtOTHours])

I get #Error in all the textboxes in the footer.
The textboxes in the footer that have bound fields Sum just fine.
Is there any easy fix to this?


DougP
 
you may try this:
control source: =Sum(IIf([overtime]=True,[Hours],0))

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top