View Full Version : Autolookup, Filter Type


DomZ
07-04-2003, 08:41 AM
Sup again,
How is this possible:

I have a table and I want the user to use informations from 2 other tables...
My relationship and layout is as is as follow:

TblClients:
ClientID
CustomerID (PK)
Address
ShippingAddress
City
Province
Country
PostalCode
PhoneNumber
FaxNumber
Others

TblPieces:
PieceID (PK)
CustomerID
PartNumber
Dimension
BaseMetal
Fini
Thickness
Specification
Process
Line
Special
Price
Unit
Gage
Photo

TblPiecesTracking:
TrackingID
Date
CustomerID
PartNumber
Quantity
Weight

Relationship as follow:
1 to many from Clients to Pieces

What I want to do:
In TblPiecesTracking, Use CustomerID from TblClients(doable using Lookup Wizard) and When A user clicks on a Company Lets say XYZ, all the pieces from that Company is going to appear in the PartNumber Field

EDIT: What would be the WHERE value .. i though of this..?
WHERE (((tblPieces.CustomerID)=Tables!TblPiecesTracking! CustomerID))
Thanks again.

bjackson
07-04-2003, 02:53 PM
why dont you create the query using the access wizard
then look at the sql view,it will give you the correct syntax for
the query

Pat Hartman
07-04-2003, 08:14 PM
When you use the query builder to build the query, draw a join line from one table to the other to connect the CustomerID fields. You don't need a where clause to join two tables. Use the where clause to apply selection criteria to limit the number of rows returned.