Continous form Calculation

M

Murray

I posted a similar question over on General but I think after reading some
posts it should be here.
I have a continuous form which should calculate a total invoice for each
line. When I use my simple code it makes each total on the form the same. Is
it possible to update only the record set where the field is and not the
whole form. The code I am using is :

gsti = 1.1
If GST = True Then (GST is a check box if ticked add amount)
i = Me.Quantity * Me.amount * gsti
Else
i = Quantity * amount
End If
Me.TotalInvoice = i

Thanks
 
D

Duane Hookom

Have you tried using an expression
=IIf([GST]=True, [Quantity] * [Amount] * 1.1, [Quantity] * [amount])
 
M

Murray

Exactly what I was looking for, Thanks

Duane Hookom said:
Have you tried using an expression
=IIf([GST]=True, [Quantity] * [Amount] * 1.1, [Quantity] * [amount])
--
Duane Hookom
MS Access MVP


Murray said:
I posted a similar question over on General but I think after reading some
posts it should be here.
I have a continuous form which should calculate a total invoice for each
line. When I use my simple code it makes each total on the form the same.
Is
it possible to update only the record set where the field is and not the
whole form. The code I am using is :

gsti = 1.1
If GST = True Then (GST is a check box if ticked add amount)
i = Me.Quantity * Me.amount * gsti
Else
i = Quantity * amount
End If
Me.TotalInvoice = i

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