得到随机问题 [英] To get a Random Question

查看:57
本文介绍了得到随机问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ms访问,我在我的数据库中有一个表,包括字段(questionno,question,option1,option2,option3,option4,answer)。它有大约500个(比方说)记录。

i使用该表中的向导创建了一个表单(命名考试)。我在表单中有一个命令按钮(下一个)。当我按下该表中的下一个按钮记录时,一个接一个。(我需要那些记录)随机来看。

在考试表格之前,我有一个名为examtype的表格。在考试形式我有一些选项,我可以选择10个问题或20或30或类似的测试。

假设如果我选择10个问题的选项测试,那么10个问题必须在考试中进行从该表中随机形成。如何做到这一点?

任何人都可以帮助我....

提前谢谢。

i''m using ms access and i have a table in my database which consists of fields(questionno,question,option1,option2,option3 ,option4,answer).It has some 500 (say)records.
i created a form(named exam) using wizard from that table.i have a command button (next) in the form.when i press next button records from that table r coming one by one.(i need those records come at random).
previous to the exam form ,i have 1 form named examtype. In examtype form i have some options that is i can select test with 10 questions or 20 or 30 or like that.
suppose if i select option test with 10 questions ,then 10questions have to come on the exam form randomly from that table.hHow to do this?
can anyone help me....
Thanks in advance.

推荐答案


我正在使用ms访问,我的数据库中有一个表,包括字段(questionno,question,option1,option2,option3,option4,回答)。它有大约500个(比方说)记录。

i使用该表中的向导创建了一个表单(命名考试)。我在表单中有一个命令按钮(下一个)。当我按下一个按钮时来自该表的记录r逐一出现。(我需要这些记录随机出现)。

在考试表格之前,我有一个名为examtype的表格。在考试形式我有一些选项,我可以选择10个问题或20或30或类似的测试。

假设如果我选择10个问题的选项测试,那么10个问题必须在考试中进行从该表中随机形成。如何做到这一点?

任何人都可以帮助我....

提前致谢
i''m using ms access and i have a table in my database which consists of fields(questionno,question,option1,option2,option3 ,option4,answer).It has some 500 (say)records.
i created a form(named exam) using wizard from that table.i have a command button (next) in the form.when i press next button records from that table r coming one by one.(i need those records come at random).
previous to the exam form ,i have 1 form named examtype. In examtype form i have some options that is i can select test with 10 questions or 20 or 30 or like that.
suppose if i select option test with 10 questions ,then 10questions have to come on the exam form randomly from that table.hHow to do this?
can anyone help me....
Thanks in advance.



我创建的例程几乎完全符合您的要求,但我没有现成的例程。一旦我有机会,我会很乐意为你发布。请继续关注。

There is a routine that I created that does almost exactly what you are requesting but I do not have it readily available. As soon as I get the chance, I''ll be happy to post it for you. Stay tuned.



我正在使用ms访问,我的数据库中有一个由字段组成的表(questionno,question, option1,option2,option3,option4,answer)。它有大约500个(比方说)记录。

i使用该表中的向导创建了一个表单(命名考试)。我有一个命令按钮(下一个)in表格。当我按下表格中的下一个按钮记录时,逐个来。(我需要这些记录随机出现)。

在考试表格之前,我有一个名为examtype的表格。在考试形式我有一些选项,我可以选择10个问题或20或30或类似的测试。

假设如果我选择10个问题的选项测试,那么10个问题必须在考试中进行从该表中随机形成。如何做到这一点?

任何人都可以帮助我....

提前致谢
i''m using ms access and i have a table in my database which consists of fields(questionno,question,option1,option2,option3 ,option4,answer).It has some 500 (say)records.
i created a form(named exam) using wizard from that table.i have a command button (next) in the form.when i press next button records from that table r coming one by one.(i need those records come at random).
previous to the exam form ,i have 1 form named examtype. In examtype form i have some options that is i can select test with 10 questions or 20 or 30 or like that.
suppose if i select option test with 10 questions ,then 10questions have to come on the exam form randomly from that table.hHow to do this?
can anyone help me....
Thanks in advance.



此代码生成一个涉及由用户确定的随机问题数的测试。 a是/否字段tblQuestions中的[OK]设置随机问题的实际状态:

This code generates a Test involving a Random Number of Questions that are determined by the User. a Yes/No Field [OK] in tblQuestions sets the actual status of the Random Questions:

展开 | 选择 | Wrap < span class =codeDivider> | 行号


先生,

非常感谢你的回复。

但我希望这些问题的形式不在报告中。在你编写的openreport代码中。该表单是使用向导创建的tablequestions.in那个表格我有下一个按钮,当我按下它时,下一个问题必须随机出现。

i复制该代码并尝试但mydb作为数据库用户数据类型未定义错误即将来临。如何解决在error.can我随机而不是在报告中得到表格上的问题。

请帮助我....
sir,
Thank u very much for ur reply.
But i want those questions in the form not in the report.in the code u wrote openreport.That form is created using wizard from the tablequestions.in that form i have next button when i press it next question has to come randomly.
i copied that code and tried but mydb as database user datatype not defined error is coming.how to solve that error.can i get questions on the form randomly instead of in report.
please help me....


这篇关于得到随机问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆