IIF Statement

T

T Miller

I am using an Update Qry I have a field that I need to update that is PO
Price. From this I have two fields that I need to use; i.e. Vendor ID and
Category. The fields are currency that I am removing a % from the field for
PO Price. I am not sure how to set this up in the query. I think it should
be in the update to:

IIF([Vendor ID]='0000000440',[PO Line Price]/1.045, IIF([Category]=8810,[PO
Line Price]/1.003),[PO Line Price]))

What am I missing here? how should the update qry be set up?
 
K

KARL DEWEY

You did not state the problem.
What is not working as you expect?
Is there error messages?
Are there mathmatical errors?
 
T

T Miller

Karl,

I kept getting expression errors? Not sure if the IIF statement is done
correctly. I need to update only the Vedor ID with a % and within the Vendor
ID the Category with a different %.
--
Thomas


KARL DEWEY said:
You did not state the problem.
What is not working as you expect?
Is there error messages?
Are there mathmatical errors?

--
KARL DEWEY
Build a little - Test a little


T Miller said:
I am using an Update Qry I have a field that I need to update that is PO
Price. From this I have two fields that I need to use; i.e. Vendor ID and
Category. The fields are currency that I am removing a % from the field for
PO Price. I am not sure how to set this up in the query. I think it should
be in the update to:

IIF([Vendor ID]='0000000440',[PO Line Price]/1.045, IIF([Category]=8810,[PO
Line Price]/1.003),[PO Line Price]))

What am I missing here? how should the update qry be set up?
 
K

KARL DEWEY

I need to update only the Vedor ID with a % and within the Vendor ID the
Category with a different %.
You are confusing me.
How will you do a % update on an Vendor ID?
Your post has IIF([Vendor ID]='0000000440' and the quotes and leading zeros
tell me that it is a text field.

--
KARL DEWEY
Build a little - Test a little


T Miller said:
Karl,

I kept getting expression errors? Not sure if the IIF statement is done
correctly. I need to update only the Vedor ID with a % and within the Vendor
ID the Category with a different %.
--
Thomas


KARL DEWEY said:
You did not state the problem.
What is not working as you expect?
Is there error messages?
Are there mathmatical errors?

--
KARL DEWEY
Build a little - Test a little


T Miller said:
I am using an Update Qry I have a field that I need to update that is PO
Price. From this I have two fields that I need to use; i.e. Vendor ID and
Category. The fields are currency that I am removing a % from the field for
PO Price. I am not sure how to set this up in the query. I think it should
be in the update to:

IIF([Vendor ID]='0000000440',[PO Line Price]/1.045, IIF([Category]=8810,[PO
Line Price]/1.003),[PO Line Price]))

What am I missing here? how should the update qry be set up?
 
T

T Miller

I am updating the PO Line Price. I am using the Vendor ID to narrow it down
to only update the PO Line Price/1.045 and in the Vendor ID there is a
Category Code that I have to update PO Line Price/1.003 with. I am removing
these percentages out of the PO Line Price. Yes sir, ([Vendor
ID]='0000000440' is a text field.
--
Thomas


KARL DEWEY said:
Category with a different %.
You are confusing me.
How will you do a % update on an Vendor ID?
Your post has IIF([Vendor ID]='0000000440' and the quotes and leading zeros
tell me that it is a text field.

--
KARL DEWEY
Build a little - Test a little


T Miller said:
Karl,

I kept getting expression errors? Not sure if the IIF statement is done
correctly. I need to update only the Vedor ID with a % and within the Vendor
ID the Category with a different %.
--
Thomas


KARL DEWEY said:
You did not state the problem.
What is not working as you expect?
Is there error messages?
Are there mathmatical errors?

--
KARL DEWEY
Build a little - Test a little


:

I am using an Update Qry I have a field that I need to update that is PO
Price. From this I have two fields that I need to use; i.e. Vendor ID and
Category. The fields are currency that I am removing a % from the field for
PO Price. I am not sure how to set this up in the query. I think it should
be in the update to:

IIF([Vendor ID]='0000000440',[PO Line Price]/1.045, IIF([Category]=8810,[PO
Line Price]/1.003),[PO Line Price]))

What am I missing here? how should the update qry be set up?
 
K

KARL DEWEY

Post your complete SQL statement by opening the query in design view,
clicking on menu VIEW - SQL View, highlight all in the SQL window, copy, and
paste in a post.
--
KARL DEWEY
Build a little - Test a little


T Miller said:
I am updating the PO Line Price. I am using the Vendor ID to narrow it down
to only update the PO Line Price/1.045 and in the Vendor ID there is a
Category Code that I have to update PO Line Price/1.003 with. I am removing
these percentages out of the PO Line Price. Yes sir, ([Vendor
ID]='0000000440' is a text field.
--
Thomas


KARL DEWEY said:
I need to update only the Vedor ID with a % and within the Vendor ID the
Category with a different %.
You are confusing me.
How will you do a % update on an Vendor ID?
Your post has IIF([Vendor ID]='0000000440' and the quotes and leading zeros
tell me that it is a text field.

--
KARL DEWEY
Build a little - Test a little


T Miller said:
Karl,

I kept getting expression errors? Not sure if the IIF statement is done
correctly. I need to update only the Vedor ID with a % and within the Vendor
ID the Category with a different %.
--
Thomas


:

You did not state the problem.
What is not working as you expect?
Is there error messages?
Are there mathmatical errors?

--
KARL DEWEY
Build a little - Test a little


:

I am using an Update Qry I have a field that I need to update that is PO
Price. From this I have two fields that I need to use; i.e. Vendor ID and
Category. The fields are currency that I am removing a % from the field for
PO Price. I am not sure how to set this up in the query. I think it should
be in the update to:

IIF([Vendor ID]='0000000440',[PO Line Price]/1.045, IIF([Category]=8810,[PO
Line Price]/1.003),[PO Line Price]))

What am I missing here? how should the update qry be set up?
 
Top