G
Guest
Here' s what the data looks like on one record from the table I'm trying to
query to compute payroll. Each record has over 30 fields, but I'm only
concerned with a basic strategy for now. Each word represents a field on a
record.
Vin#
DriverID1 Description1 Rate1 Date1
DriverID2 Description2 Rate2 Date2
DriverID3 Description3 Rate3 Date3
I want to be able to query a Rate if the corresponding DriverID and Date
fall within the parameters of my search. I want to show desired rates in a
pay report specific to a DriverID similar to the field layout that is shown
above with all 4 fields in a row. The problem I'm running into is this:
When in Query design mode, how can I say in field 'Rate1' [Select rate if
field 'DriverID1' = DriverID 'X' and field 'Date1' = Between these dates.]
while simultaneously running the same equation for Rate2 and Rate3, all of
which are in the same query design? It seems like I'm looking for a way to
link fields within a query based on a compound conditional statement. Not
sure if this is possible. Any suggestions, perhaps for alternate table
designs that would make this easier. I want to Eventually create a macro
that will allow me to create a report for a specific driver with one click
and then entering the DriverID, the Start Date, and the End Date.
Mastering Access one post at a time
query to compute payroll. Each record has over 30 fields, but I'm only
concerned with a basic strategy for now. Each word represents a field on a
record.
Vin#
DriverID1 Description1 Rate1 Date1
DriverID2 Description2 Rate2 Date2
DriverID3 Description3 Rate3 Date3
I want to be able to query a Rate if the corresponding DriverID and Date
fall within the parameters of my search. I want to show desired rates in a
pay report specific to a DriverID similar to the field layout that is shown
above with all 4 fields in a row. The problem I'm running into is this:
When in Query design mode, how can I say in field 'Rate1' [Select rate if
field 'DriverID1' = DriverID 'X' and field 'Date1' = Between these dates.]
while simultaneously running the same equation for Rate2 and Rate3, all of
which are in the same query design? It seems like I'm looking for a way to
link fields within a query based on a compound conditional statement. Not
sure if this is possible. Any suggestions, perhaps for alternate table
designs that would make this easier. I want to Eventually create a macro
that will allow me to create a report for a specific driver with one click
and then entering the DriverID, the Start Date, and the End Date.
Mastering Access one post at a time