Attention Allen Browne

G

Guest

Hi Allen -

You were helping me with my problem and I had another question for you. I'm
confused as to how my [Users and Interests] table should look. Would you be
able to tell me which fields I need in my table, which should be the primary
key and which fields should be linked to my other tables to establish the
relationship between them and the [Users and Interests] table. Sorry to be
so confused, but I'm really new at this. I really appreciate all of your
help. Thanks!

In the Relationships window (Tools | Relationships), drag:
- UserId from the User table onto UserId in the [Users and Interests] table.
- InterestId from the Interests table onto InterestId in the [Users and
Interests] table

BTW, just noticed you had a UserInterestId field in the [Users and
Interests] table? That should be an InterestId field (foreign key, not
primary key.) The primary key of [Users and Interests] table will be the
combination of UserId + InterestId (i.e. select both fields in table design
view, and press the Key icon on the toolbar.)

Using the combination of the 2 fields as primary key means that you cannot
enter the same UserId and InterestId combination multiple times in [Users
and Interests] table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top