PhilManchester
New member
- Local time
- Today, 12:45
- Joined
- May 12, 2015
- Messages
- 2
After a break of about 6 years I have just started using Access again for a simple project to keep track of items at a bring and buy event. I decided that it might be convenient to store the data about things for sale in two tables, ITEM and COSTS joined be a one-to-one relationship.
There was no problem in creating the tables or the relationship, but during testing I discovered that when I attempted to save a new record in the table ITEM (which uses an autonumber field for its unique identifier) I could not - I got an error message because there was no corresponding record in the table COSTS.
Now I know that I can avoid the problem by combining fields from the two tables into one, but it got me thinking.
How does one create corresponding records with the same identifier in two tables at the same time? How is a one-to-one relationship actually implemented in Access?
There was no problem in creating the tables or the relationship, but during testing I discovered that when I attempted to save a new record in the table ITEM (which uses an autonumber field for its unique identifier) I could not - I got an error message because there was no corresponding record in the table COSTS.
Now I know that I can avoid the problem by combining fields from the two tables into one, but it got me thinking.
How does one create corresponding records with the same identifier in two tables at the same time? How is a one-to-one relationship actually implemented in Access?