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