Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Test Interface & Database - TEST FORM CREATION 1

Status
Not open for further replies.

k992081

Technical User
Dec 10, 2001
5
GB
I am trying to create something simular to that of the CCNA or MCSE Test system, whereby there are uses, who take training courses and then multiple choice exams, which is of course recorded in a database, (however, this will not be online but with the forms you can create in MS Access 2002).

There are six courses, which consist of 50 questions each. Every test will generate 10 random questions from the 50 questions from each course.

Would anyone know:

1)How to create/code a single form so that it displays a different question when 'next cmd button' is clicked.

2)To be able to generate random questions from 50 - do I query it?

My tables are: (capitals represent primary anf foreign keys)

USER (USER_ID, Lastname, Firstname, Dept)
SECURITY (USER_ID, PASSWORD)
QUESTION (ANSWER_ID, Question_Text, Answer_Text, Weighting)
RESULT (TEST_ID, USER_ID, ANSWER_ID, Date, Time, Result, 010101, 010102.........065004)

the 010101 etc means 01 = Course 1, 01 = Ques 1, 01 = Answer 1, therefore 010101.

Any help is greatly appreciated!




 
Alright,

In order to create a form which displays questions and has a button which allows the user to skip through the questions, I would :

1 - On the Open event of the form, create a piece of code which randomly selects 10 questions out of the fifty. I believe you can use the RND command. I would then store the ten numbers in an array !

2 - Once the ten selected numbers have been defined then create a recordset which selects the ten questions, using a query, from the main question storage table. Then the form will be based upon the table with all of the questions populated within it.

Sorted !

Harpz
 
Thanks for a quick response, I shall have a go...watch this space!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top