Subform Calculating

M

Murray

I sort of remeber doing this whilst studing but have forgotten most of the
stuff I knew about Access, so I hope someone can help with this quick enquiry.
I have an Access 2000 Form that has a sub form on it. The subform is used to
input invoicing information. The subform is created from a Table called
Invoicing and all fields needed show on the subform. The problem I have is
that I should be multipling an amount field by and quantity field and adding
tax if a check box is clicked.
While the code needed is relatively easy:
gsti = 1.1
If GST = True Then (GST is the Checkbox)
i = Quantity * amount * gsti
Else
i = Quantity * amount
End If
TotalInvoice = i (this is the value to be shown in the subform)
I always update all records on the subform not just the one where I have
done the changes. I think it is to do with choosing the correct record set,
but that is where my memory fails! Can someone point me in the right
direction.
Many Thanks
 
S

strive4peace

Hi Murray,

Make a calculate control on the form

Name --> TotalInvoice

controlSource --> = Quantity * amount * IIF(GST, 1.1, 1)

where Quantity, amount, and GST represent the respective
control NAMES

You must use the Name property of a control, not its
ControlSource. You can change the Name property to
something logical.

I am not sure I understand your question... if this is not
what you are looking for, can you give an example? thanks.

Warm Regards,
Crystal
MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 

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