Re: Hours Worked

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Pete (anonymous_at_discussions.microsoft.com)
Date: 12/06/04


Date: Mon, 6 Dec 2004 06:19:27 -0800

If I'm honest, I don't know, I am fairly new to Access
and just struggling along.

ClockNo & Reason are the only "Keys" in that table, I'm
not sure what a composite key is.

DateWkd is the Date the additional hours were worked.

Can you help me set the tables up to make this work, even
if I have to start again, I'm not bothered.

Thanks

Pete

>-----Original Message-----
>In tblHoursWorked, are you using ClockNo and Reason as a
composite primary
>key, or is there no primary key in that table?
>
>The warning about duplicates suggests that you may have
these two keys as a
>composite primary key, which means that, even though
each can accept
>duplicates, there cannot be two records where the values
of both fields in
>combination are the same in both records (e.g., ClockNo
value is 1 and
>Reason value is 1 in one record, so no other record can
have that same
>combination).
>
>What is DateWkd in tblHoursWorked table? I don't see a
field that has a name
>that seems to correspond with "hours worked" that you
say you're entering
>into this table?
>
>--
>
> Ken Snell
><MS ACCESS MVP>
>
>
>"Pete" <pete@nospam.net> wrote in message
>news:cp1nte$fi4$1@newsg2.svr.pol.co.uk...
>> I wish to keep a track of hours worked by employees,
these can be for
>> various reasons e.g
>>
>> Training
>> Sickness
>> Visits
>> Bereavement
>> Paternity
>>
>> I thought a many to many relationship would do, but I
am struggling to get
>> it to accept duplicate values. Tables I have are:
>>
>> tblEmployee
>> ClockNo (Primary Key)
>> Name
>> Dept
>> Shift
>>
>> tblHoursWorked
>> ClockNo (Foreign Key)
>> Reason (Foreign Key)
>> DateWkd
>> Comments
>>
>> tblReason
>> Reason (Primary Key ) (e.g Training, Sickness etc..)
>>
>> When I try to assign some hours worked to an employee,
If they have
>already
>> worked some on Training, I get the error about
duplicates. Both ClockNo &
>> Reason are set to accept Duplicates in tblHoursWorked
>>
>> Any help would be appreciated
>>
>> Pete
>>
>>
>
>
>.
>



Relevant Pages

  • Re: Hours Worked
    ... are you using ClockNo and Reason as a composite primary ... The warning about duplicates suggests that you may have these two keys as a ... composite primary key, which means that, even though each can accept ...
    (microsoft.public.access.gettingstarted)
  • Re: Hours Worked
    ... Do any of the fields have a Key icon at the left side of the field column at ... > ClockNo & Reason are the only "Keys" in that table, ... >>duplicates, there cannot be two records where the values ...
    (microsoft.public.access.gettingstarted)
  • Hours Worked
    ... I wish to keep a track of hours worked by employees, ... ClockNo ... ClockNo (Foreign Key) ... Reason ...
    (microsoft.public.access.gettingstarted)
  • Re: Itanium Port Question
    ... It is a fine and good practice to have the primary key be the first ... if you have no reason for it to be elsewhere. ... By physicaly storing the primary key up front, rms does not have to ... I found RMS compression to ALWAYS be a net CPU AGAIN. ...
    (comp.os.vms)
  • Re: Primary Key and Indexes, are they necessary?
    ... The vendor responsed that the reasons they do not add the primary key ... Indexes do slow down data entry. ... Indexes should always be evaluated and have a reason for existing. ... In Oracle 10g, the Cost Based Optimizer has been improved to the point ...
    (comp.databases.oracle.misc)