View Full Version : A problem with a relation table


Mike34
04-18-2007, 01:15 AM
I've been stuck on this for hours. I have to create a relational database on a small company and when i try to create a query on anything i only get one record showing up, with no criteria. This is my relationship
http://img156.imageshack.us/img156/1809/relationshipsbi0.png (http://imageshack.us)
Any help would to make this relationship work would be greatly appreciated, i need to go ly down

Dennisk
04-18-2007, 04:56 AM
Ensure your the relationship is set to all records on the one side of a one to many. Access often set the default relationship to ony show records where the key is equal.

boblarson
04-18-2007, 06:09 AM
I think you should post your database here as it LOOKS like you have one-one relationships for all tables and that shouldn't be that way.

stopher
04-18-2007, 10:35 AM
All tables must have a primary key. Two of your tables don't have a primary key so you need to rectify this.

As previous post suggest, the relationships are not created "properly" so you can't see the real relationship (one-many, one-one). Delete each relationship by clicking on the line and pressing the delete button. Then re-instate the relationship but this time ensuring you click "enforce referential integrity". This will show the one-many relationship.

That aside, this doesn't really solve your problem. Your problem is most likely to do with missing data. For example, suppose you've entered 10 customer orders in "customer order" but only one customer in "customer". Then by default, a join query between these tables using the query editor will show only the record where there is a match in both tables (assuming you haven't overwritten the join type in the relationship view - unlikely!?!). I would help if you could post your query here or as Bob suggests, posts the whole d/b.

Stopher