PhillipsAndrew
Registered User.
- Local time
- Today, 07:31
- Joined
- Aug 7, 2003
- Messages
- 21
One to one relationships..
Using some of the examples on this site, I've created a many to many relationship using a junction table.. It works very well.
One of the tables (tbl_PersonInfo) contains person info (PersID (PK), PersName etc)
One table contains departments (tbl_Departments) that person is associated with (can be more than one).
The junction table links these together.
My problem is that I want to use the Person Info table to relate to another table which contains information on privileges (tbl_Privileges) (what they can order etc... so it contains lots of yes/no fields). I've created a relationship (one to one) between tbl_PersonInfo and tbl_Privileges based on PersID (PK).
tbl_PersonInfo
PersID (PK)
Name
tbl_Departments
DeptID(PK)
DepartmentName
tbl_Junction
PersID
DeptID
tbl_privileges
PersID
CanOrderOver1000 (yes/No)
CanOrderOver5000 (Yes/No)
My problem is that as I enter new people (and their departments) onto the database using a form (based on query between tbl_PersonInfo and tbl_Departments), how can I get it to automatically put the PersID into tbl_Privileges?
I don't want to do this from the same form but want to do it from a separate form later on....
Does any of this make sense? I'm sure it's something simple but would appreciate any help. It seems to me that I'll use the personnel info in lots of other places too, how does it automatically update its relationship?
Thanks,
P
Using some of the examples on this site, I've created a many to many relationship using a junction table.. It works very well.
One of the tables (tbl_PersonInfo) contains person info (PersID (PK), PersName etc)
One table contains departments (tbl_Departments) that person is associated with (can be more than one).
The junction table links these together.
My problem is that I want to use the Person Info table to relate to another table which contains information on privileges (tbl_Privileges) (what they can order etc... so it contains lots of yes/no fields). I've created a relationship (one to one) between tbl_PersonInfo and tbl_Privileges based on PersID (PK).
tbl_PersonInfo
PersID (PK)
Name
tbl_Departments
DeptID(PK)
DepartmentName
tbl_Junction
PersID
DeptID
tbl_privileges
PersID
CanOrderOver1000 (yes/No)
CanOrderOver5000 (Yes/No)
My problem is that as I enter new people (and their departments) onto the database using a form (based on query between tbl_PersonInfo and tbl_Departments), how can I get it to automatically put the PersID into tbl_Privileges?
I don't want to do this from the same form but want to do it from a separate form later on....
Does any of this make sense? I'm sure it's something simple but would appreciate any help. It seems to me that I'll use the personnel info in lots of other places too, how does it automatically update its relationship?
Thanks,
P