Form that asks questions based on responses to other Questions

Form that asks questions based on responses to other Questions

Post by YWtrcnV » Sat, 07 Jul 2007 00:44:00


One of our users wanted a fillable Word form that asked different questions
based on their answers to other questions on the form. I wasn't sure how to
do this in Word, but someone suggested that it could be done in Access. Can
this be done?

Thanks fpr the help!!

Ken K. - 2191

P.S. For example 1. Enter users Age _______
If users age is > 18, Display additional question, Does user Drink?;
otherwise, skip this question.
--
akkrug
 
 
 

Form that asks questions based on responses to other Questions

Post by missinglin » Sat, 07 Jul 2007 03:08:30

This is going to be complicated, in any language, but it can be done. You
need to have a "submit" button for each question, and base what future
questions (and accompanying "Submit" buttons) become visible. All textboxes
and Submit buttons, except for the initial ones, in this case AgeField and
SubmitAge, need to be invisible by default. Then, assuming that your age
field is named AgeField and your Submit button for this field is named
SubmitAge, do something like this:

Private Sub SubmitAge_Click()
If AgeField > 18 Then
DoYouDrink.Visible = True
SubmitDoYouDrink.Visible = True
Else
'Show whatever field/submit button you want next if age <= 18
End If
End Sub

Good Luck!

Linq

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.yqcomputer.com/

 
 
 

Form that asks questions based on responses to other Questions

Post by c2N1YmFkaX » Sat, 07 Jul 2007 15:52:02


My basic plan would be to make all non-relevant fields disabled (using the
form's "on current" event) and use after update events in the appropriate
fields to enable other required fields (if that makes sense). It would take a
bit of work but should be straightforward.

me.[field].enabled = true
 
 
 

Form that asks questions based on responses to other Questions

Post by gls85 » Sat, 07 Jul 2007 22:43:09


A little different take on this would be to treat this like a survey.
We use a product by a company called Question Pro. It allows you to do
branching (questions based on previous answers). The basic version is
free. You might want to take a look and see if it would work for you.
Lots of reporting capabilities also.

www.questionpro.com

Standard disclaimer: not associated with nor do I profit from question pro