Hello,
This is my first post, so I apologize if I am not doing something in the right way. Additionally, I looked for information on this subject in the forum but did not see anything. I am creating forms for my database and am not sure what is the best way to set them up so that I don't have to enter the primary key information multiple times.
I have three tables: Location, Meeting Details, and Point of Contact (POC). One Location can be for many meetings (one to many) and one POC can be for many meetings (one to many). The Location ID is set to Autonumber as the primary key of Location and the POC ID is set to Autonumber as the primary key for Point of Contact. Meeting Details contains the Location ID and POC ID as foreign keys.
The optimum situation would be to enter the information in this order: Meeting Details (date and time), Location, POC. However, this wouldn't work due to referential integrity rules, as Location and POC must have a record before the foreign key can be entered in the Meeting Details. So, I entered the information in the Location and POC tables first. My problem is that if I am using a form (or table) to enter the information in Meeting Details, I have to remember the Location ID and POC ID. Is there a solution to this? This is a pretty simple set up, so I am thinking there should be an answer to this. I have tried using queries and subforms (or is this the answer?).
Thank you!
Location
- LocationID (primary key)
- LocationName
- Address
Meeting Details
- Day
- Time
- LocationID (foreign key)
- POCID (foreign key)
Point of Contact
- POCID (primary key)
- Name