S
scarlton via AccessMonster.com
I have a two tables; One that holds Pay Period information with [Pay],
[StartDate], and [EndDate] as the 3 fields and a Table for Timesheet with 3
fields, [Pay], [Date] and [Hrs] information. The user will enter a Date along
with the hours they worked in the timesheet table but I need to use a DLookup
to bring in the [Pay] field from the PayPeriod table into the [Pay of the
timesheet table based on the date that is entered in the timesheet table.
Since there are normally 26 pays in a year The [Pay] field will be 1-26 with
the start of that pay period in the [StartDate] and the end of that pay
period in the [EndDate]
I'm somewhat familiar with the DLookup but it has to be something to the
effect that: If [Date] <= [BegDate] and >= [StartDate], get the number in the
[Pay] field from the pay period table and put it in the [Pay] field on the
timesheet table. Any ideas how to code this?
[StartDate], and [EndDate] as the 3 fields and a Table for Timesheet with 3
fields, [Pay], [Date] and [Hrs] information. The user will enter a Date along
with the hours they worked in the timesheet table but I need to use a DLookup
to bring in the [Pay] field from the PayPeriod table into the [Pay of the
timesheet table based on the date that is entered in the timesheet table.
Since there are normally 26 pays in a year The [Pay] field will be 1-26 with
the start of that pay period in the [StartDate] and the end of that pay
period in the [EndDate]
I'm somewhat familiar with the DLookup but it has to be something to the
effect that: If [Date] <= [BegDate] and >= [StartDate], get the number in the
[Pay] field from the pay period table and put it in the [Pay] field on the
timesheet table. Any ideas how to code this?