Timesheet Database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • christian

    #1

    Timesheet Database

    I'm creating a Timesheet Database for the employees of my Department.
    One of my tables is called Fiscalpayperiod and contains: Paysunday,
    payweek, Date, Day.
    Pay Sunday Pay week Date Day
    9/28/2003 1 9/29/2003 Monday
    9/28/2003 1 9/30/2003 Tuesday
    9/28/2003 1 10/1/2003 Wednesday
    9/28/2003 1 10/2/2003 Thursday
    9/28/2003 1 10/3/2003 Friday
    9/28/2003 1 10/4/2003 Saturday
    10/5/2003 2 10/5/2003 Sunday
    10/5/2003 2 10/6/2003 Monday
    10/5/2003 2 10/7/2003 Tuesday
    10/5/2003 2 10/8/2003 Wednesday
    10/5/2003 2 10/9/2003 Thursday
    10/5/2003 2 10/10/2003 Friday
    10/5/2003 2 10/11/2003 Saturday

    My Problem is that I need to populate this data in a subform, in order
    to find out the time that each employee works. On top of the form I've
    the employee info and then subfom would be the FiscalPayPeriod .

    This is my fist time creating a database. please I need your help as
    soon as possible!

    Thank you.
  • Geoff

    #2
    Re: Timesheet Database

    Christian,

    You say you need a subform, but I'm not sure why you're
    having difficulty creating it. So this reply is a *guess*
    at an appropriate solution.

    It seems you have an Employee table, which will be
    used as the recordsource for the main form.

    It seems the Fiscalpayperiod table is to be the
    recordsource for the subform, which will appear on
    the main form.

    You say the Fiscalpayperiod table contains four fields.
    These fields appear not include something like
    EmployeeID. This may be the problem.

    Here's my guess:

    1. Your main table needs to contain a primary key field,
    called, say, EmployeeID. This field should be an
    autonumber field and marked as the primary key.

    2. Your Fiscalpayperiod table needs to contain an
    EmployeeID field (as a foreign key). This is not a
    primary key field in this table.

    3. In the relationships window, you need to create a
    relationship between the main table (Employees) and
    the sub-table (Fiscalpayperio d). Do this by dragging
    the EmployeeID (primary key) field in the Employee
    table to the EmployeeID (foreign key) field in the
    Fiscalpayperiod table. This should automatically
    set up a one-to-many relationship (indicated by 1 and
    infinity on the join line). Edit the relationship
    properties (eg to check the referential integrity box).

    4. In design view, create a main form for the Employee
    table and a sub-form for the Fiscalpayperiod table. With
    both forms open in design view, drag the subform to the
    main form. Because you have set up a relationship
    between the primary key of the main table and the
    foreign key of the sub-table, Access will create the
    relationship between the main and subforms to keep
    them synchronised.

    If this isn't your scenario, then sorry, I don't know what
    you want.

    Regards.
    Geoff


    Comment

    • cristian sepulveda

      #3
      Re: Timesheet Database


      Thank you so much. It was really helpful.

      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...