Ok this is a complicated problem that I want to do in the Code Builder of Access...
I can\'t figure it out for a total and getting information from the subform
I have 2 check boxes that are taxes and if they are checked then they will be added to the price
then the total for that one will be quantity multiplying with the unitprice and adding the taxes
but if I have say 5 items, I want all of the items added together!
So you know what I mean here is a pic:
<img src=http://www.geocities.com/canjac2001pics/Total.jpg>
I want all the red items added to the total
I thought of this:
Private Sub Total_BeforeUpdate(Cancel As Integer)
If OrderDetail_TaxableGST = True Then
GST.Value = 7
Else
GST.Value = 0
End If
If OrderDetail_TaxablePST = True Then
PST.Value = 8
Else
PST.Value = 0
End If
Dim PTax, GTax, Tax
PTax = PST.Value/100
GTax = GST.Value/100
Tax = (Quantity.Value*UnitCost.Value)*(PTax+GTax)
Total.Value = (Quantity.Value*UnitCost.Value)+Tax
End Sub
But I don\'t know how to add all of the items!
Thanks!
I can\'t figure it out for a total and getting information from the subform
I have 2 check boxes that are taxes and if they are checked then they will be added to the price
then the total for that one will be quantity multiplying with the unitprice and adding the taxes
but if I have say 5 items, I want all of the items added together!
So you know what I mean here is a pic:
<img src=http://www.geocities.com/canjac2001pics/Total.jpg>
I want all the red items added to the total
I thought of this:
Private Sub Total_BeforeUpdate(Cancel As Integer)
If OrderDetail_TaxableGST = True Then
GST.Value = 7
Else
GST.Value = 0
End If
If OrderDetail_TaxablePST = True Then
PST.Value = 8
Else
PST.Value = 0
End If
Dim PTax, GTax, Tax
PTax = PST.Value/100
GTax = GST.Value/100
Tax = (Quantity.Value*UnitCost.Value)*(PTax+GTax)
Total.Value = (Quantity.Value*UnitCost.Value)+Tax
End Sub
But I don\'t know how to add all of the items!
Thanks!
