Expression Builder on a Form

J

JMB

In the footer of a continuous form, I am trying to write an expression
builder for the Control Source of an unbound object (text box) that will sum
the number of hours (HOURS field) if the values in another field
(FunctionalArea) equals a certain value.

The FunctionalArea field contains several valid values (such as Development
- Design, etc..) and I need to total the hours that were worked under that
functional area.

I tried: SUM[HOURS],IIf[FunctionalArea]= "DEV" - and Access accepted the
statement, but it doesn't work. When I go to the form view the field says:
#Name?

Help anyone?
 
R

Rob Parker

Try this expression in your unbound textbox:
=Sum(Iif([FunctionalArea]= "DEV",[Hours],0))

HTH,

Rob
 
J

JMB

Rob - Thank you - Thank you - Thank you It worked and you saved me hours of
frustration!! You're my hero!!
--
JMB


Rob Parker said:
Try this expression in your unbound textbox:
=Sum(Iif([FunctionalArea]= "DEV",[Hours],0))

HTH,

Rob

JMB said:
In the footer of a continuous form, I am trying to write an expression
builder for the Control Source of an unbound object (text box) that will
sum
the number of hours (HOURS field) if the values in another field
(FunctionalArea) equals a certain value.

The FunctionalArea field contains several valid values (such as
Development
- Design, etc..) and I need to total the hours that were worked under that
functional area.

I tried: SUM[HOURS],IIf[FunctionalArea]= "DEV" - and Access accepted the
statement, but it doesn't work. When I go to the form view the field
says:
#Name?

Help anyone?
 
Top