Sample Table: ID Call Type CALL TYPE EXT 8:01am-4:59pm 5pm-8am 2 STANDARD CALL TOW $18.00 $23.00 3 JUMP START J/S $18.00 $23.00 4 TOL (JSO) TOL $18.00 $23.00 5 TOL (FHP) FHP $18.00 $23.00 6 WINCH OUT W/O $18.00 $23.00 7 TOW AWAY TAW $18.00 $23.00 8 TIRE CHANGE T/C $10.00 $10.00 9 RELEASE R/S $10.00 $10.00 10 AUCTION CARS AUCTION $10.00 $10.00 11 ASAP WHEELS ASAP TOW $18.00 $23.00 12 HOURLY PAY H/R $14.00 $14.00 13 MILLAGE PAY M/P $0.35 $0.35 Based on that table information i have a form with Start_miles, End_miles, Start_time, End_time, Call_type, and Drivers_pay. on the Call_type is a drop down list with the information above and sets to CALL TYPE EXT so what i need to a button to put in drivers pay auto based on that for example, start miles: 10, end miles 20, start time 8:00pm, end time 9:00pm call type: TOW so drivers pay would be $23, another example :start miles: 10, end miles 20, start time 8:00pm, end time 9:00pm call type: M/P so drivers pay would be end miles - start miles (10) X $.35 = $3.50, last Example would be:start miles: 10, end miles 20, start time 8:00pm, end time 9:00pm call type: H/R so drivers pay would be end time - start time=1hr X $14 = $14 Please help this could also be done on after update on a field i need this so i can lock the drivers pay so my drivers can not edit their pay!!
|