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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top