G
Guest
I have an Iif statement that as far as I can tell says what I need it to say,
but running the query proves otherwise. This is it:
Status: IIf([ShopCartSmallDesc].[Status]="pre" And
([IM2_InventoryItemWhseDetl].[QtyOnHand]-[IM2_InventoryItemWhseDetl].[QtyOnSalesOrder]-[IM2_InventoryItemWhseDetl].[QtyOnBackOrder])>0,"new",IIf([ShopCartSmallDesc].[Date
Imported]>DateAdd("m",-2,Date()),"new",[ShopCartSmallDesc].[Status]))
I think this says (and need it to say):
If [status] is "pre" AND [qtyonhand] is > 0, update [status] to "new", if
not, check to see if [dateimported] is less than two months old, if it is,
update [status] to new, if not, leave it as whatever it was.
But, this must not be correct though, because I'm getting a bunch or records
[status] updated to "new" even though they weren't "pre" and they aren't less
than two months old.
Can anyone see what I'm doing wrong here?
Thanks for any assistance.
but running the query proves otherwise. This is it:
Status: IIf([ShopCartSmallDesc].[Status]="pre" And
([IM2_InventoryItemWhseDetl].[QtyOnHand]-[IM2_InventoryItemWhseDetl].[QtyOnSalesOrder]-[IM2_InventoryItemWhseDetl].[QtyOnBackOrder])>0,"new",IIf([ShopCartSmallDesc].[Date
Imported]>DateAdd("m",-2,Date()),"new",[ShopCartSmallDesc].[Status]))
I think this says (and need it to say):
If [status] is "pre" AND [qtyonhand] is > 0, update [status] to "new", if
not, check to see if [dateimported] is less than two months old, if it is,
update [status] to new, if not, leave it as whatever it was.
But, this must not be correct though, because I'm getting a bunch or records
[status] updated to "new" even though they weren't "pre" and they aren't less
than two months old.
Can anyone see what I'm doing wrong here?
Thanks for any assistance.