Calculations in a form

G

Guest

I have 3 fields in my table - Subtotal, Tax and Total. I have created a form
from the table for users to input the figures. Tax is 10%, so how can I make
Access automatically calculate the tax and the total once the subtotal has
been input.
 
H

Hoodwink

either set the Total Text box Control source to "=val(txtSubTotal)*1.1"
or set the after update event on the Subtotal text box to:

If val(me.txtSubtotal) > 0 then
txtTotal = txtSubTotal + txtSubTotal * 0.1
end if
 
G

Guest

I tried putting the expression into the Total Text box control source. When I
put a figure in the Subtotal field on the form, the total is calculated and
shown. However, it is not saved into the Total field within the table. Any
ideas why this would be?
 

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