Here is the SQL.
SELECT [Qry(3)POreceivingswithWIMS].CORP,
[Qry(3)POreceivingswithWIMS].DIVISION,
[Qry(3)POreceivingswithWIMS].FACILITY,
[Qry(3)POreceivingswithWIMS].DST_CNTR,
[Qry(3)POreceivingswithWIMS].PO_NUM,
[Qry(3)POreceivingswithWIMS].VEND_NUM,
[Qry(3)POreceivingswithWIMS].NAME,
[Qry(3)POreceivingswithWIMS].WIMS_SUB_VEND,
[Qry(3)POreceivingswithWIMS].SUB_VEND_DESC,
[Qry(3)POreceivingswithWIMS].ALLOC_VEND_NUM,
[Qry(3)POreceivingswithWIMS].ALLOC_WIMS_VEND,
[Qry(3)POreceivingswithWIMS].UNIT_MEASURE,
[Qry(3)POreceivingswithWIMS].MIN_ORD,
[Qry(3)POreceivingswithWIMS].MAX_ORD,
[Qry(3)POreceivingswithWIMS].WEIGHT_UOM,
[Qry(3)POreceivingswithWIMS].TOT_WGHT,
[Qry(3)POreceivingswithWIMS].TOT_CASES,
[Qry(3)POreceivingswithWIMS].TOT_UOM,
[Qry(3)POreceivingswithWIMS].LAST_FM_DATE,
[Qry(3)POreceivingswithWIMS].SHIPPING_POINT
FROM [Qry(3)POreceivingswithWIMS]
GROUP BY [Qry(3)POreceivingswithWIMS].CORP,
[Qry(3)POreceivingswithWIMS].DIVISION,
[Qry(3)POreceivingswithWIMS].FACILITY,
[Qry(3)POreceivingswithWIMS].DST_CNTR,
[Qry(3)POreceivingswithWIMS].PO_NUM,
[Qry(3)POreceivingswithWIMS].VEND_NUM,
[Qry(3)POreceivingswithWIMS].NAME,
[Qry(3)POreceivingswithWIMS].WIMS_SUB_VEND,
[Qry(3)POreceivingswithWIMS].SUB_VEND_DESC,
[Qry(3)POreceivingswithWIMS].ALLOC_VEND_NUM,
[Qry(3)POreceivingswithWIMS].ALLOC_WIMS_VEND,
[Qry(3)POreceivingswithWIMS].UNIT_MEASURE,
[Qry(3)POreceivingswithWIMS].MIN_ORD,
[Qry(3)POreceivingswithWIMS].MAX_ORD,
[Qry(3)POreceivingswithWIMS].WEIGHT_UOM,
[Qry(3)POreceivingswithWIMS].TOT_WGHT,
[Qry(3)POreceivingswithWIMS].TOT_CASES,
[Qry(3)POreceivingswithWIMS].TOT_UOM,
[Qry(3)POreceivingswithWIMS].LAST_FM_DATE,
[Qry(3)POreceivingswithWIMS].SHIPPING_POINT
HAVING ((([Qry(3)POreceivingswithWIMS].UNIT_MEASURE)="W") AND
(([Qry(3)POreceivingswithWIMS].TOT_UOM)<30000)) OR
((([Qry(3)POreceivingswithWIMS].UNIT_MEASURE)="V") AND
(([Qry(3)POreceivingswithWIMS].TOT_UOM)<2000)) OR
((([Qry(3)POreceivingswithWIMS].UNIT_MEASURE)="P") AND
(([Qry(3)POreceivingswithWIMS].TOT_UOM)<40));
Can you post the entire SQL statement?
--
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
Thanks, but I get a Call error, whatever that means.
Change the WHERE clause in your SQL statement to look like:
WHERE ([Unit_Measure] = "P" AND [TOT_UOM] < 40 )
OR ([Unit_Measure] = "W" AND [TOT_UOM] < 30000 )
OR ([Unit_Measure] = "V" AND [TOT_UOM] < 2000 )
When you look at this in the design view, it should make sense to
you.
email address is invalid
Please reply to newsgroup only.
:
I have a field [UNIT_MEASURE] in a query that I have this in the
criteria
this pulls everything with W, V, P in it, I have another field
[TOT_UOM] next to it where I put this in the criteria
IIf([UNIT_MEASURE]="P",<40)
IIf([UNIT_MEASURE]="W",<30000)
IIf([UNIT_MEASURE]="V,<2000)
How do I get this field to lookup these criteria's. Do I do it this
way or
=IIf([UNIT_MEASURE]="W",<30000,IIf([UNIT_MEASURE]="P",<40,IIf([UNIT_MEASURE]="V,<2000)))
I would like this field [TOT_UOM] to show only the W's that are
under
30000, the V's under 2000 and the P's under 40. Is this correct, if
so
it's not pulling anything in the query.