C
cbhealth
I have had a request to set up a form that will skip two or three fields if
the first field is no. Is there a way I can do this?
the first field is no. Is there a way I can do this?
I have had a request to set up a form that will skip two or three fields if
the first field is no. Is there a way I can do this?
For instance: If the control asks "Is the client pregnant?" and "No", or
"Unknown" is the choice made for the combo box, then the controls for "how
many months" , and "Is this the first pregnancy?", could be skipped or not
tabbed to by the cursor and go to a different control. If the answer is yes,
then the cursor would follow the tab order set.
John Vinson said:Thanks, much clearer!
You can use VBA code in the combo box's AfterUpdate event:
Private Sub comboboxname_AfterUpdate()
If Me.comboboxname = "No" OR Me.comboboxname = "Unknown" Then
Me.txtXYZ.SetFocus
End If
End Sub
where txtXYZ is the name of the control to which you want to skip.
John W. Vinson[MVP]