By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,484 Members | 1,811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,484 IT Pros & Developers. It's quick & easy.

Access Relationships

P: 45
I have created a database for restaurant reservation and meal ordering system.
After I created a form to place orders a new table appeared and I dont know why?

tblReservation
ReservationID
CustID
NumberOfGuests
TableID
TimeID
Date

tblCustomer
CustID
CustName
CustContactNumber
CustNotes

tblTable
TableID
LocationID
NumberOfSeats

tblTime
TimeID
TimeLabel

tblOrder
OrderID
TableID
GuestsArrived
GuestsLeft
Notes

tblLocation
LocationID
LocationName

tblOrderDetail
OrderID
ItemID


tblItem
ItemID
Name
ItemTypeID
NumberInStock
Re-OrderLevel
Cost
Notes
InUse

ItemTypeID
ItemType

A new table appears as a T-Junction form between (tblOrderDetail) OrderID and (tblItem) ItemID, which is a copy of tblItem.

Is this something to do with the fact that tblOrderDetail has 2 primary keys?
Feb 9 '07 #1
Share this Question
Share on Google+
5 Replies


NeoPa
Expert Mod 15k+
P: 31,186
I'm a little confused.
Where does the table appear? In the Relationships window or in the database Tables window? What is its name?
Feb 10 '07 #2

P: 45
It only appears in the relationships window, not the tables window, it's called itself tblItem1. Its an exact copy of tblItem with the Primary key linked to tblOrderDetail in just the same way as tblItem does. Via right clicking you can open it; all the records are the same as tblItem.
Feb 10 '07 #3

NeoPa
Expert Mod 15k+
P: 31,186
It only appears in the relationships window, not the tables window, it's called itself tblItem1. Its an exact copy of tblItem with the Primary key linked to tblOrderDetail in just the same way as tblItem does. Via right clicking you can open it; all the records are the same as tblItem.
Thank you.
In that case it is not a new table as such. It is a way of showing a separate relationship. This may, or may not, indicate a problem. The form has created a relationship to handle what it needs. This may be because the relationship you already set up was wrong somehow. It's hard to tell without access to your database :(
Feb 10 '07 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
tblOrderDetail
OrderID
ItemID


tblItem
ItemID
Name
ItemTypeID
NumberInStock
Re-OrderLevel
Cost
Notes
InUse

ItemTypeID
ItemType

A new table appears as a T-Junction form between (tblOrderDetail) OrderID and (tblItem) ItemID, which is a copy of tblItem.

Is this something to do with the fact that tblOrderDetail has 2 primary keys?
The two primary keys would not cause this problem. The relationship line between tbllItem and tblItem1 indicates a circular reference. That ItemID in tblItem is actually referencing itself. Have you created a lookup dropdown reference in the tblItem Primary Key looking up a list of itself by any chance? Or have you accidently referenced tblItemType to ItemID rather than ItemTypeID?

Mary
Feb 11 '07 #5

P: 45
ItemType is referencing the right place, I may have created a lookup that referenced itself in the past though. For now I've deleted the relationship with tblItem1 and adding more records on the frmOrder hasn't created it again. Hopefully that will be the end of it. Thanks for the help.
Feb 11 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.