using iif to set rate value

B

babs

I have a main form called Jeff Employee Info on there are two text boxes with
rates on txtRate and one txtRate2BP (which is a second rate that could
possibly apply for some jobs - that the employee may do.

In the subform i have a check box called ckRate2bp that is set to default at
blank - and I had the Actual Rate field in the subform set to have control
source =Forms]![Jeff Employee Info]![txtRate])
and it worked
I would like to have the Actual rate in the subform be the txtrate in the
main form but if the ckRate2BP check box is checked inthe subform I want it
to be = to the txtRAte2BP on the main form

=iif([ckRate2bp]=-1,[Forms]![Jeff Employee Info]![txtRate2BP],Forms]![Jeff
Employee Info]![txtRate])

I put the above code in the control source for the actual rate field for the
subform but get Name? as a result???

not sure what is wrong?????

thanks,
barb
 
K

Ken Snell

What you posted has a typo in it; it's missing a [ character:

=iif([ckRate2bp]=-1,[Forms]![Jeff Employee Info]![txtRate2BP],[Forms]![Jeff
Employee Info]![txtRate])
 
D

Daryl S

Babs -

You are missing a left bracket. Try this:

=iif([ckRate2bp]=-1,[Forms]![Jeff Employee Info]![txtRate2BP],[Forms]![Jeff
Employee Info]![txtRate])
 

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