D
dl
I've read through the other posts on this subject and can't seem to apply any
of that to solve my problem. I'm hoping someone can tell me where I'm going
wrong.
What I'm trying to accomplish is this: A vendor sends in a sync file
reflecting the discount codes on items we buy -we then compare our values
against theirs to find any that have changed, and then update our systems.
No problem. My current iif statement worked fine. (note we translate some
of their discount codes to another code for our system, ie Discount Code
could be changed to NEW DISCOUNT CODE via a cross ref table)
The old, working iif statement:
IIf([SUPPLIED DISCOUNTS - DK]![NEW DISCOUNT CODE] Is Null,[SUPPLIED
DISCOUNTS - DK]![Discount code],[SUPPLIED DISCOUNTS - DK]![NEW DISCOUNT CODE])
....which of course is saying: If the NEW DISCOUNT CODE field in the cross
reference table is null, then use the original discount code that was
submitted, otherwise use the NEW DISCOUNT CODE.
cross ref table looks like this:
Discount Code NEW DISCOUNT CODE Partnership Code
A08 null null
A52 null null
.... ... ...
AA2 TRADE2 null
.... ... ...
A98 TRADE TRBL2%
Now, we're entering a partnership where we're allowed to reassign the
discount code on items where the publication date is >=13 months from today,
and are currently assigned to a set of eligible discount codes (those that
show TRBL2% in the Partnership column of the xRef table).
So I need to nest the previous IIF with a new one that does date math and
here's where I am:
IIf(([BORMS01_UDA_ITEM_DATE]![UDA_DATE]>=dateadd('m',-13,now()),AND([SUPPLIED
DISCOUNTS - DK]![Partnership Code]=†TRBL2%â€),[SUPPLIED DISCOUNTS -
DK]![Partnership Code],IIf(([SUPPLIED DISCOUNTS - DK]![NEW DISCOUNT CODE] Is
Null,[SUPPLIED DISCOUNTS - DK]![Discount code],[SUPPLIED DISCOUNTS - DK]![NEW
DISCOUNT CODE])
Please let me know if you need additional info, and THANK YOU!!!!
dl
of that to solve my problem. I'm hoping someone can tell me where I'm going
wrong.
What I'm trying to accomplish is this: A vendor sends in a sync file
reflecting the discount codes on items we buy -we then compare our values
against theirs to find any that have changed, and then update our systems.
No problem. My current iif statement worked fine. (note we translate some
of their discount codes to another code for our system, ie Discount Code
could be changed to NEW DISCOUNT CODE via a cross ref table)
The old, working iif statement:
IIf([SUPPLIED DISCOUNTS - DK]![NEW DISCOUNT CODE] Is Null,[SUPPLIED
DISCOUNTS - DK]![Discount code],[SUPPLIED DISCOUNTS - DK]![NEW DISCOUNT CODE])
....which of course is saying: If the NEW DISCOUNT CODE field in the cross
reference table is null, then use the original discount code that was
submitted, otherwise use the NEW DISCOUNT CODE.
cross ref table looks like this:
Discount Code NEW DISCOUNT CODE Partnership Code
A08 null null
A52 null null
.... ... ...
AA2 TRADE2 null
.... ... ...
A98 TRADE TRBL2%
Now, we're entering a partnership where we're allowed to reassign the
discount code on items where the publication date is >=13 months from today,
and are currently assigned to a set of eligible discount codes (those that
show TRBL2% in the Partnership column of the xRef table).
So I need to nest the previous IIF with a new one that does date math and
here's where I am:
IIf(([BORMS01_UDA_ITEM_DATE]![UDA_DATE]>=dateadd('m',-13,now()),AND([SUPPLIED
DISCOUNTS - DK]![Partnership Code]=†TRBL2%â€),[SUPPLIED DISCOUNTS -
DK]![Partnership Code],IIf(([SUPPLIED DISCOUNTS - DK]![NEW DISCOUNT CODE] Is
Null,[SUPPLIED DISCOUNTS - DK]![Discount code],[SUPPLIED DISCOUNTS - DK]![NEW
DISCOUNT CODE])
Please let me know if you need additional info, and THANK YOU!!!!
dl