Show us the SQL. Open the queries in design view. Next go to View, SQL View
and copy and past it here. Information on primary keys and relationships
would be a nice touch too

Signature
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
> I am building a warehouse management database from the ground up. The problem
> I am running into involves the 'location'.
[quoted text clipped - 27 lines]
>
> Any ideas?
> Show us the SQL. Open the queries in design view. Next go to View, SQL View
> and copy and past it here. Information on primary keys and relationships
> would be a nice touch too
SELECT [Upcoming Shipments].[Shipment Date], [Upcoming Shipments].[Ship to],
[Upcoming Shipments].[Part Number], [Upcoming Shipments].Qty, [Upcoming
Shipments].[Heat/Lot], [In Stock Inventory].Location, [Part
Numbers].[Material Length]
FROM ([Part Numbers] INNER JOIN [Upcoming Shipments] ON [Part Numbers].[Part
Number] = [Upcoming Shipments].[Part Number]) INNER JOIN [In Stock Inventory]
ON [Part Numbers].[Part Number] = [In Stock Inventory].[Part Number]
GROUP BY [Upcoming Shipments].[Shipment Date], [Upcoming Shipments].[Ship
to], [Upcoming Shipments].[Part Number], [Upcoming Shipments].Qty, [Upcoming
Shipments].[Heat/Lot], [In Stock Inventory].Location, [Part
Numbers].[Material Length]
HAVING ((([In Stock Inventory].Location)<>"OUT" Or ([In Stock
Inventory].Location) Is Null))
ORDER BY [Upcoming Shipments].[Shipment Date], [Upcoming Shipments].[Ship to];
I guess I had forgotten that the Location in the Upcoming Shipments table
actually comes from the In Stock Inventory, not Receiving as I indicated in
my first post. The only primary key involved is "Part Number" in the Part
Numbers table. The Part Number field is connected to Part Number field in
both the In Stock Inventory query and Upcoming Shipments table both listed as
a "#1" join type.
If I can give you more information to clarify, please let me know.
Thanks!
Jerry Whittle - 24 Jul 2007 20:00 GMT
Your query makes no mention of the Lot Number field. You need to add it to
the Select, Having, and group by portions of the sql.

Signature
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
> > Show us the SQL. Open the queries in design view. Next go to View, SQL View
> > and copy and past it here. Information on primary keys and relationships
[quoted text clipped - 25 lines]
>
> Thanks!
aero-spaces - 24 Jul 2007 21:02 GMT
> Your query makes no mention of the Lot Number field. You need to add it to
> the Select, Having, and group by portions of the sql.
Well, your response prompted me to double check a few things, and in so
doing, I noticed that for some reason, my lot number fields were not joined
between the Upcoming Shipments and the Current Inventory. Having fixed that,
the Shipment Planning query works as intended (although now I have to have
another query that checks for errors/missing records).
I'm still having trouble with my Current Inventory query (Problem #2 above).
Here's the SQL for that one:
SELECT [Total Received].[Part Number], [Total Received].[Heat Lot], [Total
Received]![SumOfQty Received]-NZ([Total Shipped]![SumOfQty Shipped]) AS Qty,
Receiving.Location
FROM ([Total Received] LEFT JOIN [Total Shipped] ON ([Total Received].[Heat
Lot] = [Total Shipped].[Heat/Lot Number]) AND ([Total Received].[Part Number]
= [Total Shipped].[Part Number])) INNER JOIN Receiving ON ([Total
Received].[Part Number] = Receiving.[Part Number]) AND ([Total
Received].[Heat Lot] = Receiving.[Heat Lot])
GROUP BY [Total Received].[Part Number], [Total Received].[Heat Lot], [Total
Received]![SumOfQty Received]-NZ([Total Shipped]![SumOfQty Shipped]),
Receiving.Location
HAVING ((([Total Received]![SumOfQty Received]-NZ([Total Shipped]![SumOfQty
Shipped]))>0) AND ((Receiving.Location)<>"OUT"))
ORDER BY [Total Received].[Part Number], [Total Received].[Heat Lot];