move to corresponding record

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

Guest

I have a control that has a "listbox" option with the choices "yes" and "no".
My supervisor wanted that way instead of a checkbox. Now I would like this
control to, once the answer "yes" is chosen, to move to a new control in
order for this new control to be answered, but this new control would be in
the same form. If the "no" option is chosen then the user would continue
without answering this control. How can I do this?

Miguel
 
I have a control that has a "listbox" option with the choices "yes" and "no".
My supervisor wanted that way instead of a checkbox. Now I would like this
control to, once the answer "yes" is chosen, to move to a new control in
order for this new control to be answered, but this new control would be in
the same form. If the "no" option is chosen then the user would continue
without answering this control. How can I do this?

Miguel

Put code in the AfterUpdate event of the listbox control:

Private sub listboxname_AfterUpdate()
If Me!listboxname = True Then
Me!othercontrolname.setfocus
Else
Me!yetanothercontrolname.setfocus
End If
End Sub

The user will still be able to tab or mouse into the "new control" but
the control will jump to that control, or not, depending on the value
selected in the listbox.

John W. Vinson[MVP]
 
Back
Top