It sounds like you are calculating the tax per line item. That what it does based on which Dept is selected.
Some items are taxable and others are not.
What are the controlsources for the Total Price and Tax controls? Are there any code snippets behind those 2 controls? Total Price is =[Qty]*[UnitPrice]
Sales Tax = Sales Tax
I tried "Me.subformname.Refresh " and got the following:
Compile Error: Method or Data Member Not Found.
Here is some more information:
The following is my If Then Else statement:
Dim County
County = Forms("Invoice").County
Dim Tax
If Dept = "Carstops" Or Dept = "Portabases" Or Dept = "Portabase Rental" Or Dept = "Signs" Then
If County = "Racine" Or County = "Waukesha" Then
Tax = 0.051
ElseIf County = "Milwaukee" Or County = "Ozaukee" Or County = "Washington" Then
Tax = 0.056
ElseIf County = "Calumet" Or County = "Manitowoc" Or County = "Outagamie" Or County = "Sheboygan" Or County = "Winnebago" Then
Tax = 0.05
ElseIf County = "Exempt" Then
Tax = 0
Else
Tax = 0.055
End If
End If
SalesTax.Value = Format(TotalPrice * Tax, "Currency")
Here are the fields on my Subform:
Qty - Qty_LostFocus has the If Then Else statement. (Figures tax when the quantity is changed)
Dept - Dept_GotFocus has Me.Recalc (Recalculates the Total Price)
UnitPrice - Price per item.
Total Price - (Data - Contol Source) =[Qty]*[UnitPrice]
TotalPrice_GotFocus has the If Then Else statement. (Figures tax when the Unit Price is entered or changed)
SalesTax - (Data - ControlSource) = SalesTax
Hope this helps!!