Results 1 to 5 of 5

Thread: random quiz

  1. #1
    Join Date
    Feb 2005
    Posts
    5

    Unanswered: random quiz

    is it possible to create a quiz in access forms that generates random questions? so far i have a simple table with questions. thanks

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Yes
    But its a heck of a lot of work.......

    I would suggest that if you can envision a specific task, design it then Access is capable of virtually any db realted task. Yes it has weaknessess, yes it has problems, yes it has shortcomings and limitations, but the limitations of the system designer are usually far more of a problem than the system itself.

  3. #3
    Join Date
    Feb 2004
    Posts
    533
    The answer is yes.
    And as Healdem pointed out: will require some creative thinking and design skill on the part of the developer to impliment.

    Think about the steps needed to serve up questions and avoid showing the same question repeatedly.
    1. register a tester to track queston results
    2. create a list of questions available to the tester.
    3. track which questions the tester has been asked
    4. track the responses to each question
    5. Determine a method to generate a random question


    If you have that in place getting the random question is not so complicated. You would requery the list of available questions for the tester using DAO/ADO recordset. Get the count of records 'recordset.count' and use that value with the Randomize Statement to return a random number for the next question to show.

    Here's an example right out of Access Help, modified to use as a function.

    nxtQuestion = fGetRandQ(rst.Count)

    Code:
    'Randomize Statement Example
    'This example uses the Randomize statement to initialize the random-number generator. Because the number argument has been omitted, Randomize uses the return value from the Timer function as the new seed value.
    
    
    Function fGetRandQ(intRecCount As Integer)
       ' Initialize random-number generator.
       Randomize    
    
       ' Generate random value between 1 and intRecCount.
       fGetRandQ = Int((intRecCount * Rnd) + 1)   
    End Function
    ~
    ~

    Bill

  4. #4
    Join Date
    Feb 2005
    Posts
    5
    i can create a simple login script but i am not sure how to do the tracking. were can i look for more info?

  5. #5
    Join Date
    Feb 2004
    Posts
    533
    Quote Originally Posted by sagat4
    i can create a simple login script but i am not sure how to do the tracking. were can i look for more info?
    You'll have to answer this yourself. What are your requirements? If you are just going to have one test taker at a time you don't have to save all the answers indefinitely in the database. You can export the results to Excel, Word, etc. and save the file. Then you don't need to save user information.

    On the other hand if you are going to run concurrent tests and or need to save the information in the database then you need to capture user information in a table and have a larger table, linking table, to maintain user/questions/answers for each user.

    If you want to find something pre-made then do a Google Search. If your downloading something remember its "use at your own risk"

    You may find something you can use at this site.
    WinSite! The place for shareware, demoware, trialware, tips, and utilities

    ~
    ~

    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •