Simple IF Expression

C

Christine

In Access I have a form. All I want to do is make

Text2= 0 IF Combo106="Yes"

Text2=(1*Text258) IF Combo106="No"

For the life of my I can not, using the expression builder, set the default
value of Text2 to reflect any form of this IF statement no matter what syntax
I use. What expression should I be putting in the builder??? THANKS!
 
O

Ofer Cohen

In Text2 text box control source you can write

=IIf([Combo106]="Yes", 0 , [Text258])

If the Actual value of the combo is True/False, then use
=IIf([Combo106]=True, 0 , [Text258])

Don't store this value in a table, you can always retrieve the right value
using a query with the same IIf

Select IIf([Value] = "Yes",0,[Another field]) As NewField From TableName
 
Top