nyucknyucknyuck
Technical User
IIF Statement Not Making ANY Sense.
This is an old and trusted DB that works JUST FINE in XP, but now, in Access 2010, there are boogers... and THIS one is killing me as I see no reason why it's not working (again, as it's working fine in XP)
I have the following string in a text box; it displays shipping method on a packing slip.
=IIf(Forms!frm_ProducerOrderChooser!ZeroCheck>0 And Forms!frm_ProducerOrderChooser!ShipVia=2,"Ship 2nd Day Air SAVER EOBD Via Fedex: 123456 or UPS#: ABCDEFG",IIf(Forms!frm_ProducerOrderChooser!ZeroCheck>0 And Forms!frm_ProducerOrderChooser!ShipVia=4,"Ship Next Business Day SAVER EOBD Via Fedex: 123456 or UPS#: ABCDEFG",IIf(Forms!frm_ProducerOrderChooser!ZeroCheck>0 And Forms!frm_ProducerOrderChooser!ShipVia=5," Ship RUSH Next Business Day 10:30am Via Fedex: 123456 or UPS#: ABCDEFG","Ship GROUND SAVER Via Fedex: 123456 or UPS#: ABCDEFG")))
If the [ShipVia] field equals anything but 4, I'm getting the correct text displayed, but when ShipVia = 4, it's not giving me what it should, it's displaying Ship GROUND SAVER Via Fedex: 123456 or UPS#: ABCDEFG"
I've tried simplifying the sting just to see if there were issues with such a long string and it still didnt work...the value of 4 is not triggering the right value.
Any help would be appreciated....
This is an old and trusted DB that works JUST FINE in XP, but now, in Access 2010, there are boogers... and THIS one is killing me as I see no reason why it's not working (again, as it's working fine in XP)
I have the following string in a text box; it displays shipping method on a packing slip.
=IIf(Forms!frm_ProducerOrderChooser!ZeroCheck>0 And Forms!frm_ProducerOrderChooser!ShipVia=2,"Ship 2nd Day Air SAVER EOBD Via Fedex: 123456 or UPS#: ABCDEFG",IIf(Forms!frm_ProducerOrderChooser!ZeroCheck>0 And Forms!frm_ProducerOrderChooser!ShipVia=4,"Ship Next Business Day SAVER EOBD Via Fedex: 123456 or UPS#: ABCDEFG",IIf(Forms!frm_ProducerOrderChooser!ZeroCheck>0 And Forms!frm_ProducerOrderChooser!ShipVia=5," Ship RUSH Next Business Day 10:30am Via Fedex: 123456 or UPS#: ABCDEFG","Ship GROUND SAVER Via Fedex: 123456 or UPS#: ABCDEFG")))
If the [ShipVia] field equals anything but 4, I'm getting the correct text displayed, but when ShipVia = 4, it's not giving me what it should, it's displaying Ship GROUND SAVER Via Fedex: 123456 or UPS#: ABCDEFG"
I've tried simplifying the sting just to see if there were issues with such a long string and it still didnt work...the value of 4 is not triggering the right value.
Any help would be appreciated....