I have a db with tbl_survey that has fields [Q1], [Q2] and [Q3] (for questions 1, 2 and 3). They are set as number fields. On my form frm_tbl_survey I have an option group for each question which assigns a value to [Q1], [Q2] and [Q3] depending on the option selected each question (I'm using option buttons without any default). The values are 1 (satisfied), 2 (neutral) and 3 (unsatisfied).
On the same table (and form)I have [Score].
I'd like the average of the values of [Q1], [Q2] and [Q3] to be displayed in [Score].
I built an expression in the default property of [Score] that reads [Q1]+[Q2]+[Q3]/3. But that didn't work. I kept getting zero as my return in [Score]. Then wrote code [Score]=[Q1]+[Q2]+[Q3]/3 in the on_enter event of [Score]. Now at least I get a number, but it's still a wrong return.
Any comments or suggestions on what I'm doing wrong and how I should correct it?
Thanks in advance.
On the same table (and form)I have [Score].
I'd like the average of the values of [Q1], [Q2] and [Q3] to be displayed in [Score].
I built an expression in the default property of [Score] that reads [Q1]+[Q2]+[Q3]/3. But that didn't work. I kept getting zero as my return in [Score]. Then wrote code [Score]=[Q1]+[Q2]+[Q3]/3 in the on_enter event of [Score]. Now at least I get a number, but it's still a wrong return.
Any comments or suggestions on what I'm doing wrong and how I should correct it?
Thanks in advance.