Results 1 to 3 of 3
  1. #1
    kahr3n is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    3

    Question Questionnaires Database

    Hi,



    Newbie here, I am creating a database by which I have a table with Questionnaires which are 35 items and another table that contains the choices. I have no problem on interconnecting the values of each table like one question will correspond to one set of multiple choices such as A, B, C, and D. Now, what I want to do is to check if the correspondent got the right answer or not. Or in other words, in one question the answer is either of the four choices so at the end there will be total correct answers from the validation of the user answers and the right answers.

    Attached herewith is the screen capture of the form of Questionnaires.
    Last edited by kahr3n; 12-20-2010 at 12:05 AM. Reason: Add the attachment

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I assume you have a field with the correct answer in it.

    If Me.cmbAnswer = dlookup("correctAnswer","tblName", "questionID = " & Me.txtQuestionID) Then
    'Whatever you want to do

    End If

    the Dlookup essentially runs a quick query and pulls the resulting value. also not the concatenation because in a DLookup the criteria must all be strings. The basic format is DLookup(Field Name as String, Source Name as String, Criteria as String)

  3. #3
    kahr3n is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    3
    thanks for the reply, its awesome. actually, i have sorted out my own issue. i inserted a calculated field by which it compares the two values (1.Correct answer, 2. User Answer) then gives -1 (negative one) so at the end i just use sum function to calculate total numbers of right answers. gotta apply your suggestion on the other one.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Database Design for Specification Database
    By khwaja in forum Database Design
    Replies: 2
    Last Post: 11-24-2011, 03:58 AM
  2. Replies: 1
    Last Post: 11-03-2010, 10:41 AM
  3. Replies: 4
    Last Post: 08-12-2010, 08:38 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums