Different Billing rates for different work codes

  • Thread starter Thread starter Daisy
  • Start date Start date
D

Daisy

Is there a way to have a different billing rate for
different work codes?

Or...do I set up "employee1Time"; employee1Hrly;
employee1gps;?
 
Create the table with the Work Codes and Billing rate and then use DLookup
Function to lookup the rate based on the Work Code.
If Work Code, if unique should be set as your Primary key.

Examples from Access VB Help
DLookup Function Example

The following example returns name information from the CompanyName field of
the record satisfying criteria. The domain is a Shippers table. The criteria
argument restricts the resulting set of records to those for which ShipperID
equals 1.

Dim varX As Variant
varX = DLookup("[CompanyName]", "Shippers", "[ShipperID] = 1")The next
example from the Shippers table uses the form control ShipperID to provide
criteria for the DLookup function. Note that the reference to the control
isn't included in the quotation marks that denote the strings. This ensures
that each time the DLookup function is called, Microsoft Access will obtain
the current value from the control.

Dim varX As Variant
varX = DLookup("[CompanyName]", "Shippers", "[ShipperID] = " _
& Forms!Shippers!ShipperID)The next example uses a variable, intSearch,
to get the value.

Dim intSearch As Integer, varX As Variant
intSearch = 1
varX = DLookup("[CompanyName]", "Shippers", _
"[ShipperID] = " & intSearch)"Daisy"
 
Thanks GVaught! I'll try!

-----Original Message-----
Create the table with the Work Codes and Billing rate and then use DLookup
Function to lookup the rate based on the Work Code.
If Work Code, if unique should be set as your Primary key.

Examples from Access VB Help
DLookup Function Example

The following example returns name information from the CompanyName field of
the record satisfying criteria. The domain is a Shippers table. The criteria
argument restricts the resulting set of records to those for which ShipperID
equals 1.

Dim varX As Variant
varX = DLookup("[CompanyName]", "Shippers", "[ShipperID] = 1")The next
example from the Shippers table uses the form control ShipperID to provide
criteria for the DLookup function. Note that the reference to the control
isn't included in the quotation marks that denote the strings. This ensures
that each time the DLookup function is called, Microsoft Access will obtain
the current value from the control.

Dim varX As Variant
varX = DLookup("[CompanyName]", "Shippers", "[ShipperID] = " _
& Forms!Shippers!ShipperID)The next example uses a variable, intSearch,
to get the value.

Dim intSearch As Integer, varX As Variant
intSearch = 1
varX = DLookup("[CompanyName]", "Shippers", _
"[ShipperID] = " & intSearch)"Daisy"
Is there a way to have a different billing rate for
different work codes?

Or...do I set up "employee1Time"; employee1Hrly;
employee1gps;?


.
 
Back
Top