creating a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I believe I am on the right track when I say I need to create a query

I have two table one Furniture and one Fixtures

The database is tallying the about of furniture and fixtures in a certain room

I want to create a query linking these two tables

The fieldnames in both tables are the same

RoomI
ite
quantit

When I try to create the query I get mutiple entry for each field and basicly its a big mess

In the end I would like to create a form and report with both tables..

plz help..... I really need it....
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To join 2 tables in a query use the INNER JOIN. E.g.:

SELECT ...
FROM Fixtures As X INNER JOIN Furniture AS R
ON X.ID = R.ID
WHERE ...

For entering data into these tables I strongly suggest that you use
subforms for each table and link them (the subforms) to the main form
by the RoomID. The main form should show info for the room. E.g.:

+-----------------------------------------------------------|
| Room form |
| |
| Room info..... |
| |
| +------------------------+ +------------------------+ |
| | Furniture | | Fixtures | |
| | | | | |
| +------------------------+ +------------------------+ |
+-----------------------------------------------------------+

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQDOpl4echKqOuFEgEQJsRgCgiiAle397i5O+LxW0xXH0L60Ja1gAnjUS
mAWSl+DXeFc6WE8nDAg2o8Ql
=/WXZ
-----END PGP SIGNATURE-----
 
I believe I am on the right track when I say I need to create a query.

I have two table one Furniture and one Fixtures.

The database is tallying the about of furniture and fixtures in a certain room.

I want to create a query linking these two tables.

Ummm... No. You don't.

There is no direct link between the tables. If you have a Table, five
chairs, and a buffet in the Furniture table, and four lamps in the
Fixtures table, there is no relationship between the third chair and
the second lamp!
The fieldnames in both tables are the same.
RoomID
item
quantity

When I try to create the query I get mutiple entry for each field and basicly its a big mess.

In the end I would like to create a form and report with both tables...

I'd suggest having a Form (Report) based on the Rooms table, with two
Subforms (subreports), one on each table. There *is* a relationship
between Rooms and Furniture, and between Rooms and Fixtures - just not
between those two tables.

It is not necessary (and sometimes, as in this case, not even
possible) to create One Great Master Query containing all your
information. Use the data presentation tools such as Reports for
printing, and Forms for display instead.
 
Back
Top