B
BruceM via AccessMonster.com
I couldn't think of a good, brief subject line for this thread. I have an
Employee database with EmployeeID (PK), FirstName, LastName, etc. Some
employees hold Certificate A, others hold License B, others can sign certain
documents, others can train new employees, and so forth. Some employees can
do several of the above. I had been adding Yes/No fields and such to the
Employee record for each category, but that is not a good way to go about it,
as each new "flag" field usually means multiple updates need to occur
elsewhere in the database.
I am looking for a strategy to manage the situation. One way, I suppose,
would be one-to-one relationships between Employees and a Certificate_A table,
a License_B table, etc., something like this:
tblCertA
CertA_ID (PK)
A_EmployeeID (FK)
The FK field would have a unique index.
Then for the Row Source of a combo box listing Certifcate_A holders:
SELECT tblCertA.A_EmployeeID, tblEmployee.LastName
FROM tblCertA
INNER JOIN tblEmployee
ON tblCertA.A_EmployeeID = tblEmployee.EmployeeID
ORDER BY tblEmployee.LastName
In practice there would be more fields, but that would not change the basic
idea.
I would need the CertA table for other things such as reports, etc.
Is this a reasonable approach? Am I missing something that could accomplish
the same thing without adding a new table each time (which seems in some ways
to be transferring the old problem to a new format)? Maybe I would have a
table of "extras" (CertA holders, LicenseB holders, etc.), and a junction
table between that table and tblEmployee. The more I think about it the more
I like that approach, but before I implement anything I would be interested
in hearing how others manage this situation.
Employee database with EmployeeID (PK), FirstName, LastName, etc. Some
employees hold Certificate A, others hold License B, others can sign certain
documents, others can train new employees, and so forth. Some employees can
do several of the above. I had been adding Yes/No fields and such to the
Employee record for each category, but that is not a good way to go about it,
as each new "flag" field usually means multiple updates need to occur
elsewhere in the database.
I am looking for a strategy to manage the situation. One way, I suppose,
would be one-to-one relationships between Employees and a Certificate_A table,
a License_B table, etc., something like this:
tblCertA
CertA_ID (PK)
A_EmployeeID (FK)
The FK field would have a unique index.
Then for the Row Source of a combo box listing Certifcate_A holders:
SELECT tblCertA.A_EmployeeID, tblEmployee.LastName
FROM tblCertA
INNER JOIN tblEmployee
ON tblCertA.A_EmployeeID = tblEmployee.EmployeeID
ORDER BY tblEmployee.LastName
In practice there would be more fields, but that would not change the basic
idea.
I would need the CertA table for other things such as reports, etc.
Is this a reasonable approach? Am I missing something that could accomplish
the same thing without adding a new table each time (which seems in some ways
to be transferring the old problem to a new format)? Maybe I would have a
table of "extras" (CertA holders, LicenseB holders, etc.), and a junction
table between that table and tblEmployee. The more I think about it the more
I like that approach, but before I implement anything I would be interested
in hearing how others manage this situation.