adding multiple fields on form

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I am a Access newbie:

I am trying to add 3 fields together to get a sum on my
form. the fields are [PS1], [PS2] and [PS3]. their
respective value are 10, 20 and 30. When I do this =[PS1]+
[PS2]+[PS3] my sum combines the valus (102030) instaed of
adding them together (60). How to I calculate these
seperate fields correctly?
 
I am a Access newbie:

I am trying to add 3 fields together to get a sum on my
form. the fields are [PS1], [PS2] and [PS3]. their
respective value are 10, 20 and 30. When I do this =[PS1]+
[PS2]+[PS3] my sum combines the valus (102030) instaed of
adding them together (60). How to I calculate these
seperate fields correctly?

Two suggestions:

- in the Query upon which the form is based, put a calculated field

PSSum: [PS1] + [PS2] + [PS3]

- Or, set the Control Source of the textbox to

=Val([PS1]) + Val([PS2]) + Val([PS3])

In neither case should the sum be stored in any table field - just
recalculated it as needed for display.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Your fields are text data type and that's why you get 102030. Go back to
your table and change the fields to a number data type.
 
Back
Top