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

Query 3 tables error

Status
Not open for further replies.

crystalaid

IS-IT--Management
Jun 11, 2003
11
AU
Hello again ... Brad here.. brad@crystalaid.com

I'm lost once again.....I'm needing to finish with a report

OK... I've got 4 tables (Customers, Orders, Stock, Zip Code)and all have a common field called Customer Account #. One of the tables, Customers, is an address table and I have set up a Look Up from the Customer table to the Zip Code table, so when I type in a suburb, it automatically inserts the Zip code into the Customers table from the Zip code table. This works fine.
Customers, Orders and Stock all have look up fields and link together. This works OK.
I am trying run a query and to join Customers, Orders and Stock together as a report with only certain info from each table.
I have started with "new query" and selected only three tables...Customers, Orders and Stock. When I "tick" Cust Account from each of the tables, then Suburb from Customer table, then Order # from Order table and then Stock # from Stock table. When I select run query, I get the following message "query appears to ask two unrelated question....File: C:\postcode\paradox.lck and C:\postcode\pdoxusrs.lck"

I have looked into the paradox tables and deleted all of the *.lck files.
After I have done this, and I run the query again, the same thing happens.
I can run a query on one table and it works fine, but when I try to link or join the tables as a query, I get this error message.

Can anyone please help me in what am I doing wrong?

I've been trying to do this for 2 days now and I'm ready to jump off the roof of this 10th floor building.... please help.

Many thanks to everyone and bye for now
Best regards
Brad
brad@crystalaid.com


 
You are not telling paradox how the tables are related to each other. This can be done in the existing query by using the F5 key and assigning a variable to link between the four tables. You will have to select a seperate link between each set of tables. So you could put F5+CUST in the customer field of the customer and order table and then put F5+STK in the stock field of the order table and the stock table.

Probably the easiest way for you to do it would be to select data model when you create the query, link the tables in the data model just like in the form you use, and then create the query from there. You will see the DATA MODEL button on the same selection box that allows you to put in the table name, right after you select File, New, Query.

Hope this helps.

James D. Howard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top