开发者

Storing multiple test answers in Access

I'm fairly new to Access and have gotten stuck at a point despite hours of on-line research. In short, I'm trying to write a database that will store the answers that people give on several different tests. Some people take 1 test, some take 2, 3, etc. I need to store for each student what test(s) they took and what their answers were for each question. I feel like my current approach (make a separate field for each question on my MainRecord table along with a yes/no field for each test that can be taken) is cumbersome and leading to my ultimate problem: when I populate a continuous form with all of the test questions and an adjacent combo box to input their answer, I can't transcribe the combo box value back into my MainRecord. The data for the continuous form comes from a separate table (Test1) which has a field for question number and a lookup field that allows me to select the person's answer (i.e. A,B,C,D,E).

Is there a better way to con开发者_JAVA技巧struct my tables? If not, how can I get the combo box values on a continuous form into different fields on a table? Thanks, sorry if I sound like a moron.


You're going to need to look into a more generalized structure. Here's a really basic structure that should work.

I can't help too much with all the continuous form stuff

Test
  test_id

TestQuestion
  test_id
  question_id
  question_order (used for sorting)
  question_text

QuestionPossibleAnswers
  question_id
  possible_answer_value
  possible_answer_prompt

Student
  student_id
  student_name
  // etc...


StudentTest
  test_id
  student_id
  date_taken
  // whatever

(assuming a student can only take a test once) StudentAnswers student_id question_id student_answer (would be the possible_answer_value from "QuestionPossibleAnswers"

Anyway, when a student takes a test, your top form would be 'bound' to the 'StudentTest' table i guess. The continuous form would be based probably on StudentAnswer. The student_answer drop down would need to be bound to the current StudentAnswer.question_id's possible answers (through the query builder).

It's been years since i've done Access so i can't give step by step, I apologize, but the structure above is pretty sound (if not overly simple).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜