Results 1 to 24 of 24

Thread: change access 2000 queries to vbcode

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    64

    change access 2000 queries to vbcode

    Anyway I can get the results I get from these embedded Acces 2000 queries by using vbcode.

    The queries goes like this at present :

    SELECT TOP 1 [Table].[QuestionText], [Table].[Answer] AS CorrectAnswer
    FROM [Table]
    GROUP BY [Table].[QuestionText], [Table].[Answer], rnd([IDQuestion])
    ORDER BY rnd([IDQuestion]);

    SELECT TOP 3 Table.Answer AS Correct, qQuestionTextAndAnswer.QuestionText, qQuestionTextAndAnswer.CorrectAnswer
    FROM [Table], qQuestionTextAndAnswer
    WHERE (((Table.Answer)<>[qQuestionTextAndAnswer].[CorrectAnswer]))
    ORDER BY Rnd([IDQuestion]);

    These queries are displayed now in an Access form "frmQuestions" which is applied to "Table" that has three columns id, text , and answer. The result is one question and four suggested answer with one only being correct.The arrangement of the answers is randomized--
    but the question choice is not realy random....Always starts with the same question as it relies only on rnd.

    I hope someone has suggestions for this.
    Any assistance will be appreciated.
    Last edited by ram_son; May 14th, 2006 at 11:08 AM. Reason: maybe it's easier to achieve the same result through vb code instead of access query

Posting Permissions

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



Click Here to Expand Forum to Full Width