If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Access 2002 Form Sales Tax Field
I need to create a sales tax field on a form that displays calculated tax on
"in state" sales and "0.00" on "out of state sales". If this can be linked to a text field that contains the "State" abbriviation, ie "CA", "AZ", "AR", etc., this would be ideal. |
#2
|
|||
|
|||
Access 2002 Form Sales Tax Field
Add a textbox to your form for the sales tax. Set the controlsource to:
=IIf([cboState] = "FL", [txtTotal]*0.07, 0.00) substitute the name of your state control for cboState, your total control for txtTotal, and the proper state and sales tax. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Rick" wrote in message ... I need to create a sales tax field on a form that displays calculated tax on "in state" sales and "0.00" on "out of state sales". If this can be linked to a text field that contains the "State" abbriviation, ie "CA", "AZ", "AR", etc., this would be ideal. |
#3
|
|||
|
|||
Access 2002 Form Sales Tax Field
Thanks Alvin. The statement works great. Now, is there a way to get this
information to record to s database? "Arvin Meyer [MVP]" wrote: Add a textbox to your form for the sales tax. Set the controlsource to: =IIf([cboState] = "FL", [txtTotal]*0.07, 0.00) substitute the name of your state control for cboState, your total control for txtTotal, and the proper state and sales tax. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Rick" wrote in message ... I need to create a sales tax field on a form that displays calculated tax on "in state" sales and "0.00" on "out of state sales". If this can be linked to a text field that contains the "State" abbriviation, ie "CA", "AZ", "AR", etc., this would be ideal. |
#4
|
|||
|
|||
Access 2002 Form Sales Tax Field
Unless you need to keep history of a sales for more than a year, you do not
need to record the tax since it will always be recalculated. If you do need to store it, use some code in the AfterUpdate event of the state field to write it to a bound control, instead of a calculated one: Sub cboState AfterUpdate() If Me.cboState = "FL" Then Me.txtTax = 0.07*Me.txtTotal Else Me.txtTax = 0 End If End Sub -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Rick" wrote in message ... Thanks Alvin. The statement works great. Now, is there a way to get this information to record to s database? "Arvin Meyer [MVP]" wrote: Add a textbox to your form for the sales tax. Set the controlsource to: =IIf([cboState] = "FL", [txtTotal]*0.07, 0.00) substitute the name of your state control for cboState, your total control for txtTotal, and the proper state and sales tax. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Rick" wrote in message ... I need to create a sales tax field on a form that displays calculated tax on "in state" sales and "0.00" on "out of state sales". If this can be linked to a text field that contains the "State" abbriviation, ie "CA", "AZ", "AR", etc., this would be ideal. |
#5
|
|||
|
|||
Access 2002 Form Sales Tax Field
Ypu really should not store the calculation. You do need to store the tax
rate in the record so that ypu can calculate the total sales tx as needed. Rick wrote: Thanks Alvin. The statement works great. Now, is there a way to get this information to record to s database? Add a textbox to your form for the sales tax. Set the controlsource to: [quoted text clipped - 8 lines] a text field that contains the "State" abbriviation, ie "CA", "AZ", "AR", etc., this would be ideal. -- Boyd Hi Tech Coach http://www.hitechcoach.com Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200701/1 |
Thread Tools | |
Display Modes | |
|
|