Calculation in forms

G

Guest

I am trying to do a simple order entry form. On the form, I have several
fields such as setup fee, Hourly rate, Hourly price, Mail pieces and mail
price. I have done the calculations in the form to get the total for each
item but now I want to get a grand total for all items. I have put the
calculation in a value on the form but it does no show any $ figures. Is
this a timing issue? How can I get the grand total to update every time I put
in a new amount?
Thanks so much
Joan
 
G

Guest

You may want to put an unbound text box in the form's foot and do the
calculation in that.

Use something like =sum([abc]+[def]+ghi]) as the source.

If you post the control names and more infomation smeone may give you a more
detailed answer

Hope this helps
 
J

Jeff Boyce

Joan

Access needs to know to repaint the screen to show the results of the
(re-)calculations. One way you can do this is by adding an AfterUpdate
event for each of those controls. In the txtSetupFee_AfterUpdate event, for
example, you could use:

Me.Repaint

You'd need to either do that refreshing in the AfterUpdate event of EVERY
control that could affect the total, or you'd need to create a procedure
that does that, but then you'd still need to call that procedure from EVERY
control's AfterUpdate event.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Thank you all for your information. I think I know what I have to do now. I
appreciate your time and knowledge. 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

Similar Threads

Query doesn't recalculate 2
calculation of fields 2
Mailmerge from Access to Word 16
Calculations in a form 4
Carrying a value between 2 tables 3
Form Calculations 2
Expression with a cell reference 1
Storing Data 2

Top