Hi!
I have been looking all over and haven't been able to find a solution to my problem. I wonder if I'm not doing things the right way.
I have a questionnaire. There is a table with questions ID's and questions and a dropdown menu with the different answers. There are also two boxes with the Date and hospital ID (these two parameters were picked on a previous form and were passed to my new form).
The form navigates through the questions and I would like to insert a record on another table (answer table) everytime the question changes.
I have tried with subforms and it hasn't worked. I have also tried with an SQL Statement but it's giving me errors. I am copying the statement below. If you think that there is a better option to accomplish this that would be greatly appreciated too..
thanks in advance!!!
SQL = "INSERT INTO answers ( CliniqID, Date, VarID, AnswerOther) VALUES ("&DQ&Text18&DQ&","&DQ&Text16&DQ&","&DQ&VarID&DQ&","&DQ&Combo8&DQ&","&DQ&Text14&DQ&");"
DoCmd.RunSQL SQL
I have been looking all over and haven't been able to find a solution to my problem. I wonder if I'm not doing things the right way.
I have a questionnaire. There is a table with questions ID's and questions and a dropdown menu with the different answers. There are also two boxes with the Date and hospital ID (these two parameters were picked on a previous form and were passed to my new form).
The form navigates through the questions and I would like to insert a record on another table (answer table) everytime the question changes.
I have tried with subforms and it hasn't worked. I have also tried with an SQL Statement but it's giving me errors. I am copying the statement below. If you think that there is a better option to accomplish this that would be greatly appreciated too..
thanks in advance!!!
SQL = "INSERT INTO answers ( CliniqID, Date, VarID, AnswerOther) VALUES ("&DQ&Text18&DQ&","&DQ&Text16&DQ&","&DQ&VarID&DQ&","&DQ&Combo8&DQ&","&DQ&Text14&DQ&");"
DoCmd.RunSQL SQL