AngelSpeaks
Active member
- Local time
- Today, 02:56
- Joined
- Oct 21, 2021
- Messages
- 562
I just know there has to be a simple solution. I'm using Access 2013. I have an update query that joins two tables, tblPWTable and tblPWBenefits. tblPWTable contains various rates of pay and tblPWBenefits has the hours information and calculated fields for vacation, training, etc.
One field [Gross Earned] will not calculate, even if I hardcode an amount in that column, it won't appear. It's defined as NUMBER, DOUBLE, FIXED, 2 decimals (as are all my other columns). In the dataset view, the column is blank (I don't know if that's helpful, as the other columns have zeros).
The calculation for Update To is:
Round([tblPWBenefits]![OTHrs]*([tblPWTable]![Base Wage])*1.5,2)+Round([tblPWBenefits]![Regular]*[tblPWTable]![Base Wage],2)
To simplify things, I've copied the query and removed a lot of the columns. Here is the sql:
Thanks so much.
The query results are:
One field [Gross Earned] will not calculate, even if I hardcode an amount in that column, it won't appear. It's defined as NUMBER, DOUBLE, FIXED, 2 decimals (as are all my other columns). In the dataset view, the column is blank (I don't know if that's helpful, as the other columns have zeros).
The calculation for Update To is:
Round([tblPWBenefits]![OTHrs]*([tblPWTable]![Base Wage])*1.5,2)+Round([tblPWBenefits]![Regular]*[tblPWTable]![Base Wage],2)
To simplify things, I've copied the query and removed a lot of the columns. Here is the sql:
SQL:
UPDATE tblPWTable INNER JOIN tblPWBenefits ON tblPWTable.County = tblPWBenefits.County SET tblPWBenefits.[Pension Earned] = [Total Hrs]*[tblPWTable]![Pension], tblPWBenefits.[Fringe Total] = [Total Hrs]*[tblPWTable]![Total Fringe Benefits], tblPWBenefits.[Other Earned] = [Total Hrs]*[tblPWTable]![Other Fringe Benefit], tblPWBenefits.[Base Wage] = [tblPWTable]![Base Wage], tblPWBenefits.[OT Wage] = Round([tblPWTable]![Base Wage]*1.5,2), tblPWBenefits.[DT Wage] = Round([tblPWTable]![Base Wage]*2,2), t[B]blPWBenefits.[Gross Earned] = Round([tblPWBenefits]![OTHrs]*([tblPWTable]![Base Wage])*1.5,2)+Round([tblPWBenefits]![Regular]*[tblPWTable]![Base Wage],2)[/B]
WHERE (((tblPWBenefits.[Fringe Total])>0));
Thanks so much.
The query results are: