View Full Version : Calculations in a form - please help


tckona
03-31-2002, 11:08 AM
I have a question. I created a form with pull down fields. I have a field that is a benefit with a pull down of High, med., low.. This is the same for a frequency field - High, med., low.. I created two other fields(Benefit rank, Frequency rank) that If "High" return 5, else 0. (control source = expression)
This works great, but I created another field rank that control source =([benefit rank]+[frequency rank]) this returns 55.
Is this a text vs numeric problem? Please help. I am able to do this in excel, but I do not understand this concept in access. I though I had completed the hard part by returning 5 or 0 depending on text entry. But when you go to add these it merges instead of adds.
These are set up as number fields, but they get there data from a text field. do I need to convert this data into a number using an expression. The expression in this field looks at text in another field and returns a 5. This field is formatted for a number, but it is acting like text. What do I do? I tried changing the other fields to number and that won't work. I think I am close, it seems that when I read the text in my new field and I return a 5, that the 5 is really text and somehow I need to convert this to a number even thought the field is formatted for a number. I appreciate any help in this.

Pat Hartman
03-31-2002, 05:33 PM
It is best to continue your original thread so that people can follow the discussion and not waste their time and yours by suggesting things that you have already tried. This is a link to your previous question:
http://www.access-programmers.co.uk/ubb/Forum4/HTML/006365.html

Did you change BOTH fields to numeric? and is the result you want 10?