Restrict textbox for dropdown



There is a textbox and a drop down. Once user enters any value in the
textbox he has to select the option from drop down otherwise the cursor
will not allow to move anywhere else accept the drop down and the
textbox unless it delete the value from the textbox how to i do that
needs help.

Thank You.




You will need to use the After Update evento of the text box to prevent the
user from going anywhere on the form other than to the comb:

If Not IsNull(Me.MyTextBox) Then
End If

Then, the before update event of the Combo Box:

If IsNull(Me.MyComboBox) Then
MsgBox "A Selection is Required"
Cancel = True
End If

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

Similar Threads