Using IIf staements on yes/no commands in query expressions

D

Dougt

I have a IIf query expressionas follows:
IIf([wheel broken]="yes",([standard]-[parts ground])*
[wheel price],"no charge") - this expressions shows error
in field. The IIf statements checks whether the yes/no
combo box for the [broken wheel] field was checked
(indicating "yes") it calulates the wheel charge, if not
checked, it shows "no charge" in field. Please help......
 
R

Rick Brandt

Dougt said:
I have a IIf query expressionas follows:
IIf([wheel broken]="yes",([standard]-[parts ground])*
[wheel price],"no charge") - this expressions shows error
in field. The IIf statements checks whether the yes/no
combo box for the [broken wheel] field was checked
(indicating "yes") it calulates the wheel charge, if not
checked, it shows "no charge" in field. Please help......

Is [wheel broken] a Text Field actually storing the words "yes" and "no",
or is it a Yes/No field that is merely formatted to display the words "yes"
and "no"? If the latter you might need to test for <> 0 instead of ="yes".
 

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