Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sales tax drop down

Status
Not open for further replies.

CK8

Technical User
Nov 5, 2001
15
US
I want to create a drop down list for sales tax amount options that when one is selected it will automatically calculate the sale tax on my order form. Right now I have it written so that when you “double click” on the sales take field it calculates. Problem: The sales tax rate is changing and when I put the new rate in my event it changes old records.

HELP
 
Set up a combo box with your tax rates in its value list (i.e 4;4.5;5;5.5). Have the On Change event of the combo box calculate the tax. Put code something like this:
Code:
Me.sales_tax.Value = (Me.tax_rate * amount) / 100
[\code]
with sales_tax being the text box to display the calculated tax and amount the total sale amount......
 
Thank you for your help..This works...however I m adding this to an existing form that had an existing text box for sales tax...when i place the new one on the form all old records (forms) retain correct sales tax info but now I have two sales tax text boxes on the form. With 1000 records I do not what to have to manually change each record to the new drop down way of calculating sales tax
 
New Idea Here is my presnet code for the event when I click the save button:

private Sub cmbSave_Click()
If Me.ChurchState = "ca" Then
Me.SalesTax = 0.0775 * Me.CalcSubTotal
Me.SalesTax.Requery
End If

Me.SubTotal = Me.CalcSubTotal
Me.ShipCharges = Me.CalShipTotal
Me.PaymentAmount = Me.CalcTotalPayments
Me.TotalAmountDue = Me.calcTotalDue
Me.OrderBalance = Me.calcBalanceDue
'Forms!frmContacts.PastAmountDue = Me.OrderBalance
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

QUESTION: How would I edit above to inclued an IF order date is < than 01/01/02 the calc rate at 7.5 percent
but if order date is >12/31/01 calc at 8.0 percent?

Do you think this might work? Then I could keep original sales tax text box, old records remain intake, etc...

Thanks for your input
CK8
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top