在 Access 中存储多个测试答案

发布于 2024-11-18 21:19:18 字数 405 浏览 7 评论 0原文

我对 Access 相当陌生,尽管进行了数小时的在线研究,但还是陷入了困境。简而言之,我正在尝试编写一个数据库来存储人们在几个不同测试中给出的答案。有些人参加 1 项测试,有些人参加 2、3 项测试,等等。我需要为每个学生存储他们参加的测试以及每个问题的答案。我觉得我当前的方法(为 MainRecord 表上的每个问题创建一个单独的字段,并为每个可以进行的测试创建一个是/否字段)很麻烦,并导致我的最终问题:当我用所有内容填充连续表单时测试问题和相邻的组合框来输入答案,我无法将组合框值转录回我的 MainRecord 中。连续表单的数据来自一个单独的表(Test1),该表有一个问题编号字段和一个允许我选择人的答案(即 A、B、C、D、E)的查找字段。

有更好的方法来构建我的表吗?如果没有,如何将连续表单上的组合框值获取到表上的不同字段中?谢谢,抱歉,如果我听起来像个白痴。

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 construct 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海里的那抹蓝 2024-11-25 21:19:18

您将需要研究更通用的结构。
这是一个应该有效的基本结构。

我无法对所有连续形式的内容提供太多帮助

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

(假设学生只能参加一次测试)
学生答案
学生号
问题ID
Student_answer(将是“QuestionPossibleAnswers”中的 possible_answer_value

无论如何,当学生参加测试时,我猜您的顶级表单将“绑定”到“StudentTest”表。连续表单可能基于 StudentAnswer。student_answer 下拉列表需要绑定到当前 StudentAnswer.question_id 的可能答案(通过查询生成器)。

自从我完成 Access 以来已经很多年了,所以我无法一步一步给出,我很抱歉,但是上面的结构非常合理(如果不是太简单的话)。

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文