beornottobe1234
beornottobe1234

Reputation: 25

Connection between one record and table - MS Access

I have problem with my database in MS Access. I want to choose one option (record) from table (for example name: John) and in next step have a connection with another table. When I choose another option (name: Peter) i have connection with another table. And this is important for me to have this connection between one record from table with another table. For example: Table "Name" = ["John", "Peter", "Kate"] and tables "Info about John", "Info about Peter", "Info about Kate". And when I would choose John, go to "Info about John". enter image description here

Upvotes: 1

Views: 25

Answers (1)

Applecore
Applecore

Reputation: 4099

As has been suggested in the comments, what you are proposing is not good database design.

Your table layout should be:

  • tblPerson: PersonID (Autonumber, Primary key), PersonName (Text);
  • tblPersonExtra: PersonExtraID (Autonumber, Primary key), PersonID (Number, Foreign key from tblPerson), PersonExtra (Text).

This assumes that there is a requirement for a 1 to many relationship between data to be held in the two tables. If there is a 1 to 1 relationship (for example, PersonName is "Peter", and "PersonExtra" is actually their date of birth, then there would be no real reason to split into a second table.

You really should read up on how to design a relational database.

Regards,

Upvotes: 2

Related Questions