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.
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.