IIf question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

=Iff([Tax_Exempt]=True,0,[Subtotal_Main]*0.05)

Hi, calcuating the control on my tax field. But this doesn't work. Any ideas?
 
nick said:
=Iff([Tax_Exempt]=True,0,[Subtotal_Main]*0.05)

Hi, calcuating the control on my tax field. But this doesn't work.
Any ideas?

Is that a typo in your message, where you wrote "Iff" instead of "IIf"?

Aside from that , I see nothing obviously wrong with it. I would assume
that "Tax_Exempt" and "Subtotal_Main" are controls on your form, and the
IIf() expression is the controlsource of yet another control.
 
Op 29-11-2004, heeft Dirk Goldgar verondersteld :
nick said:
=Iff([Tax_Exempt]=True,0,[Subtotal_Main]*0.05)

Hi, calcuating the control on my tax field. But this doesn't work.
Any ideas?

Is that a typo in your message, where you wrote "Iff" instead of "IIf"?

Aside from that , I see nothing obviously wrong with it. I would assume
that "Tax_Exempt" and "Subtotal_Main" are controls on your form, and the
IIf() expression is the controlsource of yet another control.

Shouldn't it be Tax_Exempt.Value = True ?
 
Gijs Beukenoot said:
Op 29-11-2004, heeft Dirk Goldgar verondersteld :
nick said:
=Iff([Tax_Exempt]=True,0,[Subtotal_Main]*0.05)

Hi, calcuating the control on my tax field. But this doesn't work.
Any ideas?

Is that a typo in your message, where you wrote "Iff" instead of
"IIf"?

Aside from that , I see nothing obviously wrong with it. I would
assume that "Tax_Exempt" and "Subtotal_Main" are controls on your
form, and the IIf() expression is the controlsource of yet another
control.

Shouldn't it be Tax_Exempt.Value = True ?

No, that's not necessary. The Value property is the default property of
the control, and if it's the "check-box bug" you're worried about, that
was never triggered by an explicit comparison to True or False, only by
code like "If Tax_Exempt Then". I'm not sure if that bug would bite in
a controlsource expression, anyway, as opposed to VBA code.
 
Back
Top