Relationship error in a query

J

Jeff Boyce

At least according to the error message (and this would have been my
question anyway), there's some question how the four tables are related.

If you want all information from all tables, you'll need to tell Access how
the tables relate one to another.

If the tables are NOT related one to another (or at least one of the tables
is not related), consider creating a query for those that ARE related, and a
separate query for (each) table not related to any others.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Syed Zeeshan Haider

Hello Everybody,

I have four tables in a databse. Each database has at least one column
containing prices of goods & services. However, these columns are not
related in anyway (some other colums are). I am trying to summerize these
price information in one query where I am trying to list the sum of prices
from every table. When I try to do so I am getting an error part of which
says:

"One or more of the tables isn't related to the others. Click OK to edit
system relationships."
 
J

Jeff Boyce

Syed

I'm having a little trouble envisioning why expenses would be kept in 4
separate tables. Is there a chance that this data has been imported
directly from an Excel spreadsheet?

A common approach using a relational database like Access is to have one
table for expenses, and have one field in that table serve to categorize the
type of expense.

In your situation, you may want to look into UNION queries (see Access
HELP). The basic approach is four separate queries, one for each table,
then combine all four using UNION.

But if your data structure could be combined into a single table, you
wouldn't need to do that.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Syed Zeeshan Haider

Thank you for your response. I accidentally hit "Send" before completing my
question. Actually I am trying to make a query which sums up all expenses
listed in different tables regardless of any relationships. Is it possible
to do so? Is there any trick where I could sum up the numerical data
(without having any required relationships) by directly typing SQL code?

Thank you,
 
Top