View Single Post
  #3  
Old April 15th, 2010, 09:13 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Lookup field and Relationships

i can see that the action field is set as a combo box with a row source of
the actions table PK, yet I don't see a relationship in the relationships
view. Is this a problem?
Yes. You are attempting to use a lookup field in the table -- do not do
that.
tblEmployee --
EmpID - Primary key
FName
LName
Gender
DOB
etc

tblActions --
ActionID - Primary key
Type -

tblEmpActions --
EmpActionID - Primary key
EmpID - foreign key
ActionID - foreign key
ActionDate -
InitiatedBy -
EndDate -
etc

Set a one-to-many relationship between the tblEmployee & tblEmpActions and
tblActions & tblEmpActions selecting Referential Integerity and Cascade
Update.
Use a form/subform with Master/Child links set on the EmpID. Use a combo to
select action Type and the ActionID bound to the tblEmpActions table.

--
Build a little, test a little.


"jrav" wrote:

I am having trouble understanding a design concept. I am setting up an
employee database for the first time. At issue is how to handle the actions
entered into a log table. I have a table for employee's info, and log table
that i am using to keep track of actions performed on employees, i.e. new
hire, raise, termination, etc. It seems appropriate to have the log table
include a FK for an actions table with all of the possible actions.

in the design view of the log table, i can see that the action field is set
as a combo box with a row source of the actions table PK, yet I don't see a
relationship in the relationships view. Is this a problem? I tried dragging
the field over to establish the relationship, but the field properties don't
match. (log table = text) Changing the data type to number wants to delete
all of the entries. So it seems like I should do an update query to change
the text to the code of the FK from the actions table to create the
relationship.

Bottom line, why is there no relationship, and does it matter long term?

thanks in advance.