move to corresponding record

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
 
J

John Vinson

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]
 

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