Create weekly incremental dates and add records

P

Pragv

Hi,
I have a database that stores hours for each employee by week.
Something like this

EmpiD ProjectID Store_Hrs Clea_Hrs Date
1 1 2 1 01/02/2006
1 1 1 3 01/09/2006
2 2 2 2 01/02/2006
2 1 0 1 01/09/2006


I have several employees and that are assigned work for each week
through out 2006.
I would like to be able to enter the same hours for several consequtive

weeks.
I currently have a form where the employees can enter a week date (like

01/15/2006) and the hours for each category (store_Hrs etc).
I would like to have a form where the employee enters a begin date and
an end date in two text boxes. If the end date is greater than the max
date available for that employee in the database, then the dates should

be added by increments of weeks until the end date and the hours
entered for a particular category for every date. This is because the
employee is assigned to work a fixed 'x' hours each week for a project
for say some 4 months.
For example if employee 2 enters a begin date of 01/01/2006 and an end
date of 05/31/2006 and enters 2 for store__hrs, the code checks for the

latest date for employee 2 available in the database which is
01/09/2006 < 05/31/2006 (end date) in this case and then the code adds
dates from 01/09/2006 until 05/31/2006 in the increments of 7 like
01/15/2006, 01/22/2006 etc until 05/31/2006 and then inputs the number
2 in the store_hrs category for each date created.
Basically, this is inputting blanket hours (the same hours for a
particular category over a period of time) instead of creating a new
record each time and then inputting the same hours for each week
manually.
In case the end date is less than the latest date in the database for
that particular employee, only the hours for that particular category
need updated for each date.


Is this something that can be done using VBA? Or Am I pushing my luck?



Any help would be greatly appreciated.


Thank you.
 
J

John Vinson

Hi,
I have a database that stores hours for each employee by week.
Something like this

Answered in your previous thread.

We're all volunteers here. Two hours turnaround is, IMO, pretty good -
patience, please!

John W. Vinson[MVP]
 
P

pietlinden

I hope you billed out at at least double time since this is a national
holiday... I mean, and for rush service... I'd tack on a couple hundred
extra just for the rush service!!!
 
J

John Vinson

I hope you billed out at at least double time since this is a national
holiday... I mean, and for rush service... I'd tack on a couple hundred
extra just for the rush service!!!

<g> Double-and-a-half time. 2.5 * $0 = $0.

John W. Vinson[MVP]
 

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