I have read as much as I can on this in the threads but I'm still not sure how to do this. My apologies if my predecessor pinched the code for function
I have inherited a database which has a form where questions are answered via a series of combo boxes with the possible answers being yes/no/NA. A text box at the top of the form calculates the average score via a function as each answer is given. This works when 28 variables were passed to the function.
The code in the text box's control source is simply = Work([Q1],[Q2],[Q3],[Q4],[Q5],[Q6],[Q7]....[Q28])
but now my boss wants to increase the number of variables to 41. I have read that there is a max of 29? variables and I have also read that you can get around this by docmd.runsql but I'm not sure how to do this as I hardly ever use Access/VBA
Using what little knowledge I have I have written
Dim sql As String
sql = "select Work([Q1],[Q2],[Q3],[Q4],[Q5],[Q6],[Q7]..[Q41])from data"
DoCmd.RunSQL sql
End Sub
but I'm not sure how to get this to display in the form. Can anyone help me
thanks
I have inherited a database which has a form where questions are answered via a series of combo boxes with the possible answers being yes/no/NA. A text box at the top of the form calculates the average score via a function as each answer is given. This works when 28 variables were passed to the function.
The code in the text box's control source is simply = Work([Q1],[Q2],[Q3],[Q4],[Q5],[Q6],[Q7]....[Q28])
but now my boss wants to increase the number of variables to 41. I have read that there is a max of 29? variables and I have also read that you can get around this by docmd.runsql but I'm not sure how to do this as I hardly ever use Access/VBA
Using what little knowledge I have I have written
Dim sql As String
sql = "select Work([Q1],[Q2],[Q3],[Q4],[Q5],[Q6],[Q7]..[Q41])from data"
DoCmd.RunSQL sql
End Sub
but I'm not sure how to get this to display in the form. Can anyone help me
thanks