Tax Box Problems

G

Guest

I have a main form with customer information and a subform with details of
the sale. I have a table with the tax codes (i.e. non-taxable, taxable at 3%,
taxable at 4%, etc.) The subform currently totals the sales and then the
user selecets the tax code on the main form footer. Everything has been
working fine, however now or tax laws have changed. I need to be able to
determine by item if it is taxable or not and then subtotal and charge tax on
the taxable items, then add the non-taxable on the same Invoice to get a
total. It will not work to have the item flagged as taxable or non since it
depends on the situation - sometimes the item is taxable, sometimes not.
I read through the previous posts and have been able to flag the item on the
subform to make it taxable, however, I can't seem to get the subtotals to
work. Here is what I have to this point:
MainForm Header contains date, InvoiceID, Customer Information
SubForm Detail contains item information including Fields: InvoiceID link,
lngItemNumber, strDescription, dblQuanity, ysnTax, curPricePerUnit (these
are pulled from related tables) text box called ExtPrice (which is
Quanity*Price)
SubFormFooter contains textbox SumExtPrice with controlsource =Sum([Ext
Price])
I added text box Taxable with control source =IIf([Tax]=True,[Ext Price],0)
and text box SumTax with control source =Sum([Taxable])
MainFormFooter has text box SubTotalBox with control source =Int(([Invoice
Details Subform].[Form]![SumExtPrice])*100+0.5)/100
For some reason the SubFormFooter =Sum([Taxable]) keeps coming up with the
#Error message
I realize there is probably a lot cleaner way to set this up.
If anyone could help, I would appreciate it. Tax law change takes effect
1/1/06.
Thanks!
 
G

Gary Miller

David,

Without more details on the situation on when something is
taxable and when it isn't, I can't help you there. Your
#Error message, however, could be coming from your summing
of the 'Taxable' field if the name of the Taxable control is
also named 'Taxable'. If you are doing calculations on a
control on a form or report, make sure that you rename the
control to a different name such as 'txtTaxable' otherwise
Access gets confused.

Another thought is to make sure that your fields are not
getting reversed. Could 'Taxable' actually be the True/False
field and 'Tax' be the amount to Sum?
 
G

Guest

Tax is the name of the ysnTax checkbox. Taxable is the name of the text box
that is supposed to add the taxable items. I also have a Ntaxable that is
supposed to sum the non-taxable items.
The "to tax or not to tax" situtation is if the part is a service item (that
is installled by us) it is not taxable. If the customer takes it home and
installs it, the item is considered a maintenance item and therefore taxable.
Thanks!

Gary Miller said:
David,

Without more details on the situation on when something is
taxable and when it isn't, I can't help you there. Your
#Error message, however, could be coming from your summing
of the 'Taxable' field if the name of the Taxable control is
also named 'Taxable'. If you are doing calculations on a
control on a form or report, make sure that you rename the
control to a different name such as 'txtTaxable' otherwise
Access gets confused.

Another thought is to make sure that your fields are not
getting reversed. Could 'Taxable' actually be the True/False
field and 'Tax' be the amount to Sum?

--
Gary Miller
Sisters, OR



David said:
I have a main form with customer information and a subform
with details of
the sale. I have a table with the tax codes (i.e.
non-taxable, taxable at 3%,
taxable at 4%, etc.) The subform currently totals the
sales and then the
user selecets the tax code on the main form footer.
Everything has been
working fine, however now or tax laws have changed. I
need to be able to
determine by item if it is taxable or not and then
subtotal and charge tax on
the taxable items, then add the non-taxable on the same
Invoice to get a
total. It will not work to have the item flagged as
taxable or non since it
depends on the situation - sometimes the item is taxable,
sometimes not.
I read through the previous posts and have been able to
flag the item on the
subform to make it taxable, however, I can't seem to get
the subtotals to
work. Here is what I have to this point:
MainForm Header contains date, InvoiceID, Customer
Information
SubForm Detail contains item information including Fields:
InvoiceID link,
lngItemNumber, strDescription, dblQuanity, ysnTax,
curPricePerUnit (these
are pulled from related tables) text box called ExtPrice
(which is
Quanity*Price)
SubFormFooter contains textbox SumExtPrice with
controlsource =Sum([Ext
Price])
I added text box Taxable with control source
=IIf([Tax]=True,[Ext Price],0)
and text box SumTax with control source =Sum([Taxable])
MainFormFooter has text box SubTotalBox with control
source =Int(([Invoice
Details Subform].[Form]![SumExtPrice])*100+0.5)/100
For some reason the SubFormFooter =Sum([Taxable]) keeps
coming up with the
#Error message
I realize there is probably a lot cleaner way to set this
up.
If anyone could help, I would appreciate it. Tax law
change takes effect
1/1/06.
Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top