Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lookup Tables in Query

Status
Not open for further replies.

newmanje

IS-IT--Management
Jan 5, 2004
13
I am trying to write a query in a database for my sister. The table I am trying to query refers to a lookup table for two fields. I need to be able to specify data for one of these fields but every time I try it fails to return any records.

They are both text fields and one of them is the primary key. If I specify the data for the primary key it returns records but not with the other field.

I've not worked with lookups before. Can anyone help?
 
What I need to stipulate is the Vendor but it only returns detail when I stipulate a brand as well.


SELECT returns.[Store #], returns.[Customer Name], returns.[Repair #], returns.[Date out], returns.Brand, returns.Vendor, returns.Qty, returns.[Style #], returns.Colour, returns.[PLU#], returns.[Date recv'd back]
FROM returns
WHERE (((returns.Vendor)="luxottica") AND ((returns.[Date recv'd back]) Is Null));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top