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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to query multiple tables.

Status
Not open for further replies.

AC5FF

Technical User
Jul 25, 2007
35
US
I'm stuck and I'm hoping to find a good answer here...

I have a query set up that needs to pull data from three tables. Table "Quota" Table "Product" and Table "Work"
Quota tabe contains product ID, Month (date field), and Contracted
Product Table contains productID, costs, part#,etc
Work Table contains productID, noun, serial#, dates in, out, repair action, etc..
ProductID is a Key for the product table (can't be repeated).
The query I started links all 3 productID fields

Okay.. so I need to pull down all the information from the 'work' table for a given month. I use the product table to get noun information from and the quota table for quota's on the particular unit for the month.
If I build a query to give everything EXCEPT for the quota information, I get exactly what I need. However, as soon as I add in the quota table the only information displayed is the products that have quotas. There are 200+ products, but any given month may only have 5-10 products w/a quota.

I have tried left joins, right joins, inner join, etc... Everything i try gives either totally wrong information (i.e. 5 products have quotas then all products display 5 times w/each quota amount) or displays only the items with quotas.
I have tried intermediate queries. Take the work/product table, form that information and then another query to link the quota table to the first query. Same results as above.

I know this has got to be a simple misstep someplace; but for the life of me I cannot find it!

I hope that someone out there might realize what i'm doing wrong and can help turn this o'l rusty lightswitch on in my head! :)

Thank You!
 
Hi AC5FF,
Since your problem relates to a query, and this part of the forum is about forms it would be better to post it in the other section. Also, post your sql-code with it (go to the sql-view of the query, and copy past it)....

Pampers [afro]
Keeping it simple can be complicated
 
Pampers;
OOps.. I must of mis-clicked on the wrong forum..
Thanks for the heads up.. Ill repost over there...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top