adding a skip pattern

A

ash

Does MS Access refer to "skip patterns" by a different name?

Is there any relatively simple way to include skip patterns in an Access
form? Example: if the answer to question 1 = no, then skip to question 6.

In a previous post, the reply below was given, but I must confess that I am
not so swift to fully understand. Can someone provide a bit more detail:

"You'd used the afterupdate event on a given control then use the setfocus
method to move the cursor to another control and use the Enabled control
property to control whether or not other controls remain active or not."

Ever grateful!
 
M

Mr B

Ash,

Just how are your presenting each question? Your method of presenting each
question will determine just how you will force your user to see the next
appropriate question.

Can you provide a little more detail"

--
HTH

Mr B
email if needed to:
draccess at askdoctoraccess dot com
 
B

Becca

Hi!

I have a similar question to Ash, and I am presenting my question as a combo
box. Is that the type of information you were asking for?

Thanks,
Rebecca
 
M

Mr. B

Hi!

I have a similar question to Ash, and I am presenting my question as a combo
box. Is that the type of information you were asking for?

Thanks,
Rebecca








- Show quoted text -

Becca,

I assume that you mean that you are presenting to your users one or
more combo boxes for them to select an answer from.

What do you need to do after they make a selection or answer a
question.

You can place VBA code in the "After Update" event of each combo box
that will move the focus to another control based on the choice made
by the user.

These are just general observations as to what you can do. If you
will be a little more specific as to exactly what you really want to
do then perhaps we can provide some specific solutions.

HTH

Mr B
 
B

Becca

Thanks so much for getting back to me Mr B!

Basically - all this will be happening on one form. So if a person answers
1=yes to question Q5, then I want the person to get skipped to Q8 and have
questions Q6 and Q7 be 'grayed' out so the person isn't able to even enter
anything. Is that possible?

Also, is there any other specific information that I can give you to help
aid you in helping me?

Thanks again!
Becca
 
M

Mr. B

Thanks so much for getting back to me Mr B!

Basically - all this will be happening on one form. So if a person answers
1=yes to question Q5, then I want the person to get skipped to Q8 and have
questions Q6 and Q7 be 'grayed' out so the person isn't able to even enter
anything. Is that possible?

Also, is there any other specific information that I can give you to help
aid you in helping me?

Thanks again!
Becca











- Show quoted text -

Ok, Becca,

Basically what you are going to do is that after the user selects a
value from your combo box, you will have VBA code that will enable or
disable controls and set the focus to the next appropriate combo box.

I am going to assume that your combo box has a value list as its Row
Source Type and that the value list looks something like:

1;"Yes";2;"No"

You also have the Colum Count for your combo box set to 2 and you have
at least a zero in the Column Widths property.

Having these settings will cause the combo box to display the "Yes" or
"No" but it will return a 1 or a 2 as the actual value.

With these assumptions in place, if the user selects Yes from the Q5
combo box and you want the action you described above, in the After
Update event of the Q5 combo box, you could use code like:

If Me.NameOfQ5ComboBox = 1 then
'set the focus to Q8 combo box
Me.NameOfQ8ComboBox.SetFocus
'disable Q6 and Q7 combo boxes
Me.NameOfQ6ComboBox.Enabled = False
Me.NameOfQ7ComboBox.Enabled = False
Else
'set the focus to Q6 combo box
Me.NameOfQ6ComboBox.SetFocus
End If

Of course you would change the "NameOfQ6ComboBox" to the actual name
of the specific combo box you want to referenct.

HTH

Mr B
 
M

Mr. B

Thanks Mr. B!

I can't wait to try this. I'll let you know how it goes.

:)))












- Show quoted text -

Glad to help. If you need more assistance with this, just post back.
I'll track this thread for a day or two.

Mr B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top