Invoice Form Setup Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a invoice form with a invoice details form as the subform. Currently
I have a standard setup for the invoicing form with all the main information.
But what i'm trying to do is be able to make an item non-taxable or taxable.
I created a taxable yes/no field on each product. At the current moment I
have it preforming the following code after the quantity in the subform is
updated.

If Me.Taxable = True Then
Me.Tax_Total = [Price] * Forms![Invoices]![Tax Amount]
Else
Me.Tax_Total = 0
End If

This seems to be working ok to calculate the tax but the program is it seems
like it does the entire form not just that record when I have it
sum([tax_total]).

My current setup for the subform is as follows:

Name: Invoice Details Subform

InvoiceDetailID
InvoiceID
ProductID
Quantity
Description
PricePerUnit
LinePrice
Taxable (yes/no checkbox, imported from products table)
LineTax

On the bottom of that form I have 2 unbound textboxes that have the
=sum([LineTax]) and =sum([LinePrice]). The LinePrice seems to be working 100%
but not the tax parts. The reasons for me doing this is do to providing
customers both a service and a product.

Thanks in advanced,
Matt
(e-mail address removed)
 
Don't know if I'll be much help but... I have done something similar for a
customer of mine. I didn't use code though. I had the LineTax field
Control property read like..
=iif(Me.Taxable=-1,[LinePrice]*[Forms]![Invoices]![Tax Amount],0)

Then my sum([LineTax]) at the bottom worked fine.

Steve
Wannabe Access Guru
 
Back
Top