PC Review


Reply
Thread Tools Rate Thread

Access 2002 sales tax field

 
 
=?Utf-8?B?Umljaw==?=
Guest
Posts: n/a
 
      1st Jan 2007
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.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?V2F5bmUtSS1N?=
Guest
Posts: n/a
 
      1st Jan 2007
Hi Rick

I am not sure but I think there are over 50 states and also that the tax
options may be different for each state so you may need to ignor this ??

But anyway. If the Out of state tax is applicable to "all" states other
than one where you live could use a simple IIF to appy the tax to all states
if the sufix is diiferent from one - say CA (or even a few - CA Or AZ Or AR,
etc). You would need to create a field called sales tax (or just have an
unbound box if it's for information only)


You can simply use the source for the text box like this - if there is no
tax from state AB but there is for all other states.

=IIf ( [SateField] ="AB",[SomeAmountField], [SomeAmountField]*123)

Or if there is no tax in states "AB" "CD" "EF"

=IIf ( [SateField] ="AB"Or"CD"Or"EF",[SomeAmountField],
[SomeAmountField]*123)

Something like this (note that the tax will be multiplied by 123 - so
change the rate to what it is or use a filter field if available to improve
the results if there are different tax rates in different states.)

Another way would be to use after update event

Private Sub SomeField_AfterUpdate()
If Me.State = "AB" Or "CD" Or "EF" Or "GH" Then 'add states in this row'
SalesTax = SomeAmountField * 123 'add sales tax for the above states in this
row'
Else
SalesTax = SomeAmountField * 0 'this row is for the states "not" listed above'
End If
End Sub

Or

Private Sub SomeField_AfterUpdate()
If Me.State = "AB"
SalesTax = SomeAmountField * 0
Else
SalesTax = SomeAmountField * 123
End If
End Sub


Good luck


--
Wayne
Manchester, England.



"Rick" wrote:

> 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.
>

 
Reply With Quote
 
=?Utf-8?B?Umljaw==?=
Guest
Posts: n/a
 
      1st Jan 2007

There are indeed more than 50 Postal Code abbriviations, However, I'm only
conserned with the one for the one in which I live.

I did find a simpler statement to do what I need:

=IIf([cboState] = "FL", [txtTotal]*0.07, 0.00)

However, I need this information to record to the database.

"Wayne-I-M" wrote:

> Hi Rick
>
> I am not sure but I think there are over 50 states and also that the tax
> options may be different for each state so you may need to ignor this ??
>
> But anyway. If the Out of state tax is applicable to "all" states other
> than one where you live could use a simple IIF to appy the tax to all states
> if the sufix is diiferent from one - say CA (or even a few - CA Or AZ Or AR,
> etc). You would need to create a field called sales tax (or just have an
> unbound box if it's for information only)
>
>
> You can simply use the source for the text box like this - if there is no
> tax from state AB but there is for all other states.
>
> =IIf ( [SateField] ="AB",[SomeAmountField], [SomeAmountField]*123)
>
> Or if there is no tax in states "AB" "CD" "EF"
>
> =IIf ( [SateField] ="AB"Or"CD"Or"EF",[SomeAmountField],
> [SomeAmountField]*123)
>
> Something like this (note that the tax will be multiplied by 123 - so
> change the rate to what it is or use a filter field if available to improve
> the results if there are different tax rates in different states.)
>
> Another way would be to use after update event
>
> Private Sub SomeField_AfterUpdate()
> If Me.State = "AB" Or "CD" Or "EF" Or "GH" Then 'add states in this row'
> SalesTax = SomeAmountField * 123 'add sales tax for the above states in this
> row'
> Else
> SalesTax = SomeAmountField * 0 'this row is for the states "not" listed above'
> End If
> End Sub
>
> Or
>
> Private Sub SomeField_AfterUpdate()
> If Me.State = "AB"
> SalesTax = SomeAmountField * 0
> Else
> SalesTax = SomeAmountField * 123
> End If
> End Sub
>
>
> Good luck
>
>
> --
> Wayne
> Manchester, England.
>
>
>
> "Rick" wrote:
>
> > 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.
> >

 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      1st Jan 2007
On Sun, 31 Dec 2006 22:28:00 -0800, Rick <(E-Mail Removed)>
wrote:

>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.


Put some VBA code in the AfterUpdate event of the State control. I'd
seriously consider using a Combo Box to select the state (it could
even default to Florida if that's the bulk of your sales) rather than
a textbox though.

Try afterupdate code like

Private Sub cboState_AfterUpdate()
If Me.cboState <> "FL" Then
Me.txtSalesTax = 0
End If
End Sub

If your business expands, or salestax laws change, then you may want
to include a sales tax field in a table of states - or even in the
xipcode table, since many states have local or regional sales taxes.

John W. Vinson[MVP]
 
Reply With Quote
 
=?Utf-8?B?RVogS0VZ?=
Guest
Posts: n/a
 
      1st Jan 2007
John:

SORRY, BUT.... I'm Chiming in on this discussion since it invovles something
I need to do. In the great state of Ohio, every county and local district
has differnt sales taxes. My question is along the same lines. I could use
a suggestion since I'm not familiar with VBA code and I think this is what I
will need. Here is what I have:

I have setup a [Sales Tax] table with the fields: [Sales Tax ID], [Sales
Tax], [CtyOrDist]. The latter field is a name I give the sales tax either by
county or district.

I have a field in my [Order Details] table named [Sales Tax] that I want a
tax assigned to after multiplying it by the subtotal on my form. If I've
been using the 2007 Trial and found that I can add this [Sales Tax] field
from the [Order Details] table by dragging it in. Can I do that and edit the
VBA to assign that amount to it both in the form and table, or what would I
exactly have to do?



"John Vinson" wrote:

> On Sun, 31 Dec 2006 22:28:00 -0800, Rick <(E-Mail Removed)>
> wrote:
>
> >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.

>
> Put some VBA code in the AfterUpdate event of the State control. I'd
> seriously consider using a Combo Box to select the state (it could
> even default to Florida if that's the bulk of your sales) rather than
> a textbox though.
>
> Try afterupdate code like
>
> Private Sub cboState_AfterUpdate()
> If Me.cboState <> "FL" Then
> Me.txtSalesTax = 0
> End If
> End Sub
>
> If your business expands, or salestax laws change, then you may want
> to include a sales tax field in a table of states - or even in the
> xipcode table, since many states have local or regional sales taxes.
>
> John W. Vinson[MVP]
>

 
Reply With Quote
 
=?Utf-8?B?RVogS0VZ?=
Guest
Posts: n/a
 
      1st Jan 2007
Sorry, I just read about "multi-posting". I apologize for the inconsiderate
thoughts of my selfish need of resolution. I have posted this in a chimming
response to the earliery post mentioned previously under the "Forms Coding".

However, I could still use some help. Just respond to "forms coding" if I
still warrant some help. Again, my apologies to all you MVP's
that volunteer.


"John Vinson" wrote:

> On Sun, 31 Dec 2006 22:28:00 -0800, Rick <(E-Mail Removed)>
> wrote:
>
> >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.

>
> Put some VBA code in the AfterUpdate event of the State control. I'd
> seriously consider using a Combo Box to select the state (it could
> even default to Florida if that's the bulk of your sales) rather than
> a textbox though.
>
> Try afterupdate code like
>
> Private Sub cboState_AfterUpdate()
> If Me.cboState <> "FL" Then
> Me.txtSalesTax = 0
> End If
> End Sub
>
> If your business expands, or salestax laws change, then you may want
> to include a sales tax field in a table of states - or even in the
> xipcode table, since many states have local or regional sales taxes.
>
> John W. Vinson[MVP]
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Type in one field to bring up second field in Access 2002 =?Utf-8?B?QXJjYWx5bjEyMQ==?= Microsoft Access Database Table Design 2 14th Jan 2007 01:19 AM
Access 2002 form Sales Tax Field =?Utf-8?B?Umljaw==?= Microsoft Access Form Coding 4 1st Jan 2007 09:14 PM
Access 2002 Form Sales Tax Field =?Utf-8?B?Umljaw==?= Microsoft Access Forms 4 1st Jan 2007 07:11 PM
Access 2002 field-level security: limit access to form fields =?Utf-8?B?U3RldmVJblRhbGx5Rmw=?= Microsoft Access Security 3 3rd Mar 2005 12:14 PM
How to compare 2003 sales vs 2002 in Access CS Microsoft Access 2 7th Aug 2003 10:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:18 PM.