A challenge for me

steve711

Registered User.
Local time
Today, 12:32
Joined
Mar 25, 2004
Messages
166
Maybe it won't be a challenge for you all.

Here is what I need to accomplish:

I have developed a database to help me with payroll. Currently I use a table for the start date of each pay period (every two weeks starting on a Thursday and ending on a Wednesday). So it is a simple thing to determine the start and end date of the 2 week pay period using this table.

What I would actually like is to eliminate the table all together as it requires me to have to fill in the next year's worth of pay period information, it should be an automated process.

For the life of me I cannot think of something simple. Any help or a solution to my little problem would be greatly appreciated.
 
Solved by Me

Well after typing out that post a thought began to materialize in my brain and this is what I came up with:

zz = Me.InputDate.Value - Me.SourceDate.Value
xx = Int(zz / 14)
mydate = (Me.SourceDate + (xx * 14))
Me.StartDate = mydate
Me.EndDate = mydate + 13


Works like a charm.
 

Users who are viewing this thread

Back
Top Bottom