conditional calculated field in a text box on a form

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

Guest

I'm using
iif condition,true expr IIF disposition="booked", quan*price
In a mouse down event and instead of getting the results of the calculation,
I'm getting "#name". What am I doing wrong or is there a better way? Thanks.
 
The IIF function has 3 arguments, a statement tha evaluates to True or False,
the value to return if the statement is True, and the value to return if the
statement is False. By your expression you don't show what to return if it's
False.

Since I don't know your form at all try one of the following.

I am assuming these are all text fields on your form.

If me.disposition = "booked" then
me.textfield = me.quan * me.price
end if

if not try this
IIF ([disposition]="booked", [quan]*[price],0)
this will place a zero in the field if disposition does not equal booked

Hope this helps

Fysh
 
Back
Top