Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / May 2004

Tip: Looking for answers? Try searching our database.

primary key for timecards and employees

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
joe - 29 May 2004 00:16 GMT
Hello

How can i get the results of each timecard entry to only appear in the employee table under the employee number which is unique.It is a one to many(one employee to many timecards) but i just want the entrys to be under the one time entry of the employee number not for each timecard and employee number to be repeated over and over again in the employee table.I have been told to create the employee number as a primary in the employee table and not to have a primary key at all in the timecard table but when i transfer all the fields to a form...i get dups not allowed and i cant enter another record on the form.What am i doing wrong??????
Ken Snell - 29 May 2004 00:25 GMT
Not clear at all what your table structure is. Let me suggest what I believe
would be a good starting point.

tblEmployees
   fldEmpID  (primary key)
   fldEmpFirstName
   fldEmpLastName
   (etc.)

tblTimeCardEntries
   fldTimeCardID  (primary key)
   fldEmpID (foreign key to tblEmployees)
   fldDateTimeOfEntry

No need with this setup to have info repeating as you appear to have.
Signature

       Ken Snell
<MS ACCESS MVP>

> Hello,
>
> How can i get the results of each timecard entry to only appear in the employee table under the employee number which is unique.It is a one to
many(one employee to many timecards) but i just want the entrys to be under
the one time entry of the employee number not for each timecard and employee
number to be repeated over and over again in the employee table.I have been
told to create the employee number as a primary in the employee table and
not to have a primary key at all in the timecard table but when i transfer
all the fields to a form...i get dups not allowed and i cant enter another
record on the form.What am i doing wrong??????
joe - 29 May 2004 03:36 GMT
thanks and i have tried this very same structure.Could you tell me according to this structure.....the primary keys are autonumber in one table and number in the other?Thanks
Ken Snell - 29 May 2004 04:22 GMT
Primary keys in both tables can be autonumber. The foreign key field must be
Number - Long Integer so that it matches the format of the primary key in
the parent table.

Signature

       Ken Snell
<MS ACCESS MVP>

> thanks and i have tried this very same structure.Could you tell me according to this structure.....the primary keys are autonumber in one table
and number in the other?Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.