conditional calculated field in a text box on a form

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.
 
G

Guest

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
 

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