Combobox Not Editable

  • Thread starter Thread starter Scott Viney
  • Start date Start date
S

Scott Viney

Hi All,

How can I make a combo box to be so that it cant have other values added?

I already have all the values I want the users to select from. I dont want
them typing in new ones.

Have a good one,
Scott V
 
Scott Viney said:
Hi All,

How can I make a combo box to be so that it cant have other values
added?

I already have all the values I want the users to select from. I dont
want them typing in new ones.

Have a good one,
Scott V

Hi Scott,

Set the ComboBox's "Limit to List" to YES and put the following code in
the NotInList event.

--- Warning - AirCode (untested) ---

Private Sub ComboBox_NotInList(NewData As String, Response As Integer)

Response = MsgBox("[" & NewData & "] is not a valid selection..." & _
vbCr & vbCr & _
"You must pick from the existing selections!", _
vbOKOnly + vbInformation, "Incorrect selection")

Response = acDataErrContinue

End Sub

--- End AirCode ---

You will need to change "ComboBox" to the name of your control!

hth
 

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

Clear Combobox Selection not working 0
Simple Combobox 1
Unbound combobox AfterUpdate 5
Combobox 1
set combobox value 8
combobox bookmark 1
ComboBox not updating 0
Copy record info into new form 0

Back
Top