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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List box: how to know it is empty ?

Status
Not open for further replies.

halx

Programmer
Jun 5, 2002
35
FR
Hello !
I have a list box whose rowsource is defined by a query.
Something like:
Me.lstMyListBox.rowsource = "SELECT ... FROM ... WHERE"

Is there a way to know whether my list box is empty
(ie: whether the query "SELECT ... FROM ... WHERE" is empty ?)
Thanks

Alex

 
You can use listcount for the list box:

If Me.lstMyListBox.Listcount < 1 then
' box is empty

endif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top