LizJohnson
Registered User.
- Local time
- Today, 13:35
- Joined
- Mar 13, 2014
- Messages
- 98
I am creating a new database. I have had to create 4 tables. I had to create 2 tables for customer information. The reason for this is that the "parent" table has the Sales & Use (S&U) tax number which is a unique identifier. The 2nd table is the "child" table. This will have all of the same S&U numbers as the first number but will also have a 2nd unique field which is the location field. There can be multiple locations for one S&U tax number.
One the 1st table the S&U number is the primary key. On the 2nd table I have the S&U and the Location ID both set as the primary key. I've done this so that you can have multiple S&U numbers but only one location ID associated with that S&U number.
The 3rd table is where I am storing all my data information such as packs of cigarettes sold, total tax due, etc. On these table, I have set a unique identifier as an auto number, then have the S&U and Location ID as fields.
I've also set the relationship where the relationship from table 1 to table 2 is One to Many with enforced referential integrity & Cascade delete related records. The connecting link is S&U to S&U
The 2nd table to the 3 & 4th table is also One to Many with enforce referential integrity, cascade delete related records with the connecting links as S&U and also Location ID.
I have said that you cannot create an entry in table 2 unless the corresponding S&U number is in table 1.
I am trying to create a form so that I can enter new customers and also all of their information. I have pulled the S&U field from Table 1, the Location ID from table 2. When I try to tab thru the fields, once the form is created it won't let me enter any information into the location ID. It states "Cannot add record(s); join key of table "tblCustomerInfoLocations" not in recordset.
I have attached a copy of my relationship diagram with my tables.
Any help would be greatly appreciated.
One the 1st table the S&U number is the primary key. On the 2nd table I have the S&U and the Location ID both set as the primary key. I've done this so that you can have multiple S&U numbers but only one location ID associated with that S&U number.
The 3rd table is where I am storing all my data information such as packs of cigarettes sold, total tax due, etc. On these table, I have set a unique identifier as an auto number, then have the S&U and Location ID as fields.
I've also set the relationship where the relationship from table 1 to table 2 is One to Many with enforced referential integrity & Cascade delete related records. The connecting link is S&U to S&U
The 2nd table to the 3 & 4th table is also One to Many with enforce referential integrity, cascade delete related records with the connecting links as S&U and also Location ID.
I have said that you cannot create an entry in table 2 unless the corresponding S&U number is in table 1.
I am trying to create a form so that I can enter new customers and also all of their information. I have pulled the S&U field from Table 1, the Location ID from table 2. When I try to tab thru the fields, once the form is created it won't let me enter any information into the location ID. It states "Cannot add record(s); join key of table "tblCustomerInfoLocations" not in recordset.
I have attached a copy of my relationship diagram with my tables.
Any help would be greatly appreciated.