I'm currently creating a database for a payroll system. I have a table consisting of Occupation_ID (primary key), occupation_description, normal_rate and then 3 different overtime rates. I've created a query to calculate the overtime rates for the different overtime rates, i.e.
UPDATE Occupation_Rates_Table SET occupation_rate_overtime_1 = Occupation_Rate_normal*1;
For each different overtime rate, the occupation_rate_normal is multiplied by a different value.
I then created a form that displays all the fields in the Occupation Rates Table and allows the user to add, delete and edit the various fields. I also created buttons to run the 3 queries to calculate the overtime rates. Thats where i'm struggling.
I want the queriesto apply only to the selected record, i.e. if i add a new occupation with
Occupation_ID = 10, Occupation_Desc = Accountant, Normal_Rate = R50, i want to calculate the overtime rates just for that entry, but the way i've done it, it runs for every record in the table.
Any suggestions on how i can change it so it updates only a single record would be much appreciated.