If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
primary key for timecards and employees
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?????? |
#2
|
|||
|
|||
primary key for timecards and employees
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. -- Ken Snell MS ACCESS MVP "joe" wrote in message ... 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?????? |
#3
|
|||
|
|||
primary key for timecards and employees
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
|
#4
|
|||
|
|||
primary key for timecards and employees
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. -- Ken Snell MS ACCESS MVP "joe" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|