Pulling from one table, writing to another

C

CJ-Hewitt

I have two tables, one for employee information and one for timesheet/budget
tracking on a weekly basis.

I would like to create a form where, at the start of each week, I can cycle
through the employee list (meaning pull up an employee name, either select
the default cost code or a new one, enter the week end date and mondays
hours, hit the command button to add the new record and cycle to the next
record of the employee database)

Once I establish the new week, I would have an edit form that continues from
that point.

I am doing this with the thought that eventually all tables will be locked
from view and only data editing/adding will be via form.

I am not sure how to go about placing the data I pull from table one into
table 2.

Now if I haven't completely confused you, any suggestions?
 
J

John W. Vinson

I have two tables, one for employee information and one for timesheet/budget
tracking on a weekly basis.

I would like to create a form where, at the start of each week, I can cycle
through the employee list (meaning pull up an employee name, either select
the default cost code or a new one, enter the week end date and mondays
hours, hit the command button to add the new record and cycle to the next
record of the employee database)

Once I establish the new week, I would have an edit form that continues from
that point.

I am doing this with the thought that eventually all tables will be locked
from view and only data editing/adding will be via form.

I am not sure how to go about placing the data I pull from table one into
table 2.

Now if I haven't completely confused you, any suggestions?

Well...

DON'T.

It sounds like you're trying to either copy data from the parent table into
the child table, redundantly, or trying to create empty "placeholder" records
which should (but, in the real world might not!!) get filled in later. Neither
is necessary.

If you instead have a Mainform based on the Employee table, with a Subform
based on the timesheet table linked by EmployeeID (the timesheet table should
contain NO other Employee table fields!) you can do this very easily. You
could put an unbound textbox on the mainform to enter the week end date and
include this field in the subform's Master Link Field property, with the child
link field being the corresponding timesheet table field. It's not clear what
you mean by "enter the week end date and monday's hours" - surely the
timesheet table will have multiple records for the days of the week, why
Mondays and what is the purpose of the week end date?
 
C

CJ-Hewitt

If you instead have a Mainform based on the Employee table, with a Subform
based on the timesheet table linked by EmployeeID (the timesheet table should
contain NO other Employee table fields!) you can do this very easily. You
could put an unbound textbox on the mainform to enter the week end date and
include this field in the subform's Master Link Field property, with the child
link field being the corresponding timesheet table field. It's not clear what
you mean by "enter the week end date and monday's hours" - surely the
timesheet table will have multiple records for the days of the week, why
Mondays and what is the purpose of the week end date?
The “week end date†is the last day of the companies “pay†work week. It is
the only day they track. Everything else is based upon a rather archaic
method of mon-sat hourly time (picture a time clock with no actual dates upon
them), and a very specific format for the time sheets we turn in on a weekly
basis.

Couple that with a similar method for equipment, and it adds… redundancy.

Either way, I see where you are going with this.
My original concept was to create a timesheet, where instead of entering 40
names and 40 costcodes and 40 hours, I could (based upon my limited knowledge
of access and loops) simply pull employee ID/Default CC/Default Hours from
the table, and create those rows with
EmpID----CostCode----Monday

And have a full timesheet to work with for the rest of the week.

Could you elaborate on subform's Master Link Field property?


~CJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top