By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,045 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,045 IT Pros & Developers. It's quick & easy.

Timesheet Database

P: n/a
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.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a

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 (Fiscalpayperiod). 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.

Nov 12 '05 #2

P: n/a

Thank you so much. It was really helpful.

*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.