Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to determine if no entry in combobox

Status
Not open for further replies.

projecttoday

Programmer
Feb 28, 2004
208
US
LenB(Nz(Me.Textbox, vbNullString))

This is 0 if there is nothing in the textbox. But it doesn't seem to work for a combobox. How can I test a combobox for no entry?
 
You could use IsNull

If IsNull(Me.cboCombo) Then

But you may find that:

If Trim(Me.SomeControl & "") = vbNullString Then

Suits most things.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top