Combo box checking if record selected

G

Guest

I have a combo box that a valid selection can be null or zero length based on
the table. The user must select from the list. How can you tell if a
selection was made???
 
G

Guest

In the form BeforeUpdate event you can write the code

If Trim(Me.ComboName) & "" = "" Then
MsgBox "Need to select a value"
Cancel = True ' wont let the user continue
End If
 
G

Guest

Thanks for the feedback. This is a unbound combo box. I thought I could in
code check if a item was selected?
 
D

Douglas J. Steele

I don't believe you can for a combo box. List boxes have a both a Selected
property and an ItemsSelected collection, but combo boxes don't.
 
G

Guest

Thanks for the feedback.

Douglas J. Steele said:
I don't believe you can for a combo box. List boxes have a both a Selected
property and an ItemsSelected collection, but combo boxes don't.
 

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