A
antcraw
Hi,
I am trying to create a query that has one of the fields, instead of
being linked to a table, calculating a margin based on the value in a
field, [Quote_ELC_Type]. The statement is listed below. This statement
returns an #error in the Customer Margin field when running the query.
As soon as I change the calculation from the iif statement to a simple
calculation (without any iif statements), the field returns a correct
calculation.
Any suggestions on what is wrong with this statement?
I hope I have provided enough information. If not, please post back.
Customer Margin: IIf([Quote_ELC_Type]=1,1-([ELC
West]/[Quote_SuggestedRetail]),IIf([Quote_ELC_Type]=2,1-([ELC
East]/[Quote_SuggestedRetail]),IIf([Quote_ELC_Type]=3,1-([ELC
Customer]/[Quote_SuggestedRetail]),IIf([Quote_ELC_Type]=4,1-([Quote_ELC_IDC]/[Quote_SuggestedRetail]),0))))
Thanks in advance.
Regards,
A. Crawford
I am trying to create a query that has one of the fields, instead of
being linked to a table, calculating a margin based on the value in a
field, [Quote_ELC_Type]. The statement is listed below. This statement
returns an #error in the Customer Margin field when running the query.
As soon as I change the calculation from the iif statement to a simple
calculation (without any iif statements), the field returns a correct
calculation.
Any suggestions on what is wrong with this statement?
I hope I have provided enough information. If not, please post back.
Customer Margin: IIf([Quote_ELC_Type]=1,1-([ELC
West]/[Quote_SuggestedRetail]),IIf([Quote_ELC_Type]=2,1-([ELC
East]/[Quote_SuggestedRetail]),IIf([Quote_ELC_Type]=3,1-([ELC
Customer]/[Quote_SuggestedRetail]),IIf([Quote_ELC_Type]=4,1-([Quote_ELC_IDC]/[Quote_SuggestedRetail]),0))))
Thanks in advance.
Regards,
A. Crawford