Skip over several controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to move forward about ten controls in my form if the answer to
question 1 is "No". Am using Access with XP.

Thanks in advance!

Tina.
 
Check the .SetFocus method in Access HELP.

Generically, you'd put code in the AfterUpdate event of the control for
"question1" that set the focus to the "next" control. A simple IF...THEN...
should suffice.
 
Do you want the questions to be disabled, so that no one can answer them, or
simply move the cursor past those ten controls?

I'm assuming question 1 is a check box. In its AfterUpdate event, for the
first option, put code like:

Me.Control1.Enabled = Me.chkQuestion1
Me.Control2.Enabled = Me.chkQuestion1
Me.Control3.Enabled = Me.chkQuestion1
...
Me.Control10.Enabled = Me.chkQuestion1

For the second option, put code like:

If Me.chkQuestion1 Then
Me.Control1.SetFocus
Else
Me.Control11.SetFocus
End If
 
Back
Top