If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Display one record at a time!

Hi, Fellow developers:

I have a total of 20 questions that I need to ask a user (kind of a survey
question). If the user responds YES to a question I take them to question
# 3 and if the user answers no then I ask them another set of sub questions
and then take them to question # 2. If they answer question # 2 as yes then
I take them to question # 4 (skipping # 3 question).

Also as they answer I need to I need to capture data in the database. I created
the recordset and displayed all the questions but I only need to display
one question at a time and based on their responses.

Re: Display one record at a time!

After each question is submitted, evaluate the answer and display the next
question.

Sounds simple enough. In all
You should have 2 pages.
1) DisplayQuestion
2) StoreAnswer
3) EndPage

1) Display question gets the first question to display and the available
answers unless passed a question number, if passed a question number it displays
that question and answers

2) Store answer saves the response for the question on the calling page and
retreives the next question based on the answer to the previous page question,
then redirects to displayQuestion passing the question to display. If no
more questions, display end page

3) End page, thank user for answering questions. and do whatever else needs
to be done.

"ASP learner" <Aamir.Khan@CITIZENSBANK.com> wrote:
>
>Hi, Fellow developers:
>
>I have a total of 20 questions that I need to ask a user (kind of a survey
>question). If the user responds YES to a question I take them to question
># 3 and if the user answers no then I ask them another set of sub questions
>and then take them to question # 2. If they answer question # 2 as yes then
>I take them to question # 4 (skipping # 3 question).
>
>Also as they answer I need to I need to capture data in the database. I
created
>the recordset and displayed all the questions but I only need to display
>one question at a time and based on their responses.
>
>Thanks,
>
>
>

Re: Display one record at a time!

My company opted to purchase their service instead of taking the time to
develop it themselves.

"ASP learner" <Aamir.Khan@CITIZENSBANK.com> wrote:
>
>Hi, Fellow developers:
>
>I have a total of 20 questions that I need to ask a user (kind of a survey
>question). If the user responds YES to a question I take them to question
># 3 and if the user answers no then I ask them another set of sub questions
>and then take them to question # 2. If they answer question # 2 as yes then
>I take them to question # 4 (skipping # 3 question).
>
>Also as they answer I need to I need to capture data in the database. I
created
>the recordset and displayed all the questions but I only need to display
>one question at a time and based on their responses.
>
>Thanks,
>
>
>

Re: Display one record at a time!

Sorry for not providing the code. But the code is very genric. I have questions
in Access database and using objConn and objRec objects connecting to it
and generating a recordset. Following is the code and all I want to do is
display one question (1st record) and insert the answer into the database.
If the answer to a question is "NO" then display a set of "Sub Questions"