Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2007
    Posts
    54

    Unanswered: how to record "skipped" fields.

    Hi there. Just wondering if someone can provide some design ideas. I have to build a questionnaire in MS Access. I need a way to track which questions were intentionnally skipped (aka because the question says something like " If yes, skip the next 3 questions and go to question 4)
    The database will just log NULLS for these values, which is ok. But if the end user decides just to quit the questionnaire half way through, i have to record a "special value" for the rest of the questions. let's say for arguments sake I need to log a numeric value of 999.
    Does anyone have suggestions on how I should proceed with this? Please and thanks.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    what's wrong with NULL for the unanswered ones at the end?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    especially when combined with 999 for the ones intentionally skipped

    izy
    currently using SS 2008R2

  4. #4
    Join Date
    Jul 2007
    Posts
    54

    clarification

    I guess I should reword my question. So they need to discern the difference between questions that were skipped because of built in skip rules, or items that were left blank because the user just decided to quit.
    In order to do this, i think i just need to loop through the values that are currently null and determine if they're a part of a skip rule. If they are, leave null, if they aren't assign a value of 999. This means I have to keep track of the number of questions in each survey (to control the loop) and also keep track of skip rules.

    I just wanted to bounce this idea off someone to see if there's an easier way to do this.

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    dim strSQL as string
    strSQL = "UPDATE thisTable SET thisAnswer = 999 WHERE thisQuestion IN (34, 35, 36)
    currentdb.execute strSQL

    you just intentionally skipped questions 34, 35, 36 and you can easily differentiate the skipped 999 from the NULL abandoned.

    izy


    duhhh FORGOT THE "="
    Last edited by izyrider; 01-18-08 at 16:32.
    currently using SS 2008R2

  6. #6
    Join Date
    Jul 2007
    Posts
    54

    thanks

    hey there.
    thanks for the tip.

Posting Permissions

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