Single Item in ComboBox ?


Jay Wilson

I have 2 comboboxes. Depending on what I select in ComboBox1 determines
what information will be in ComboBox2. I have this working with no issue.
What I would like to do is if ComboBox2 only has 1 item to select from, I
want ComboBox2 to use that Value with out me having to type anything.

I thought I could add some code to the OnEnter event that would check the
index value of ComboBox2 to see of only 1 item exists and then do the
following, but it doesn't work. What am I doing wrong?

Me.ComboBox2.Value = Me.ComboBox2.Column(0)




Ken Snell [MVP]

Try this to set the combo box to the first item in the list:

Me.ComboBox2.Value = Me.ComboBox2.ItemData(0)

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