Combo Box to Text Box Calculation

M

Maurita

Hi, I hope you can help me with a problem I can't seem to figure out no
matter how much research I have done. I have a combo box (Combo35)
referencing five fields (EmployeeID,Last Name, First Name, County,
Wage). I am trying to calculate the Wage into a calculation in a text
box titled "CountyTax". The problem comes in because the County Tax is
based on the County the employee lives in, which is the fourth field in
the above-referenced combo box fields. I have written the below code
in the After Update event for the Hours Worked text box but it doesn't
work. I would appreciate any help with the below code. I need to also
round the number to two decimal places, but haven't yet because I
wanted to get the code correct first. Thank you.

Criteria is: Lawrence County Tax is 0.0100 percent of Total Pay
Morgan County Tax is 0.0127 percent of Total Pay

If Me!Combo35.Column(3) = "Lawrence" Then
CountyTax = TotalPay / 0.0100
ElseIf Me!Combo35.Column(3) = "Morgan" Then
CountyTax = TotalPay / 0.0127
End If


Maurita Searcy
 
D

Duane Hookom

Don't you want to multiply the tax rate rather than dividing?

If Me!Combo35.Column(3) = "Lawrence" Then
CountyTax = TotalPay * 0.0100
ElseIf Me!Combo35.Column(3) = "Morgan" Then
CountyTax = TotalPay * 0.0127
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top