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

List box Column has a value?????

Status
Not open for further replies.

Sadukar

Technical User
Feb 19, 2003
159
0
0
IE
Hi all

How can I check if a listbox column has a value.

For Example
If Me.lstROWS__lstROWS.Column(0, 0) = (has a value) Then
MsgBox "ok"
Else
End If

any suggestions?

Thanks
s.
 
You can test the "listcount" property.
If Forms![FormName]![ListboxName].listcount > 0 etc.

Neil
 
Dangerous,
Column 2 may contain some NULLS..... do you see where I'm going. You're probably safer if you explicitly examine the 'cells' you're interested in eg a For Each loop with a xx<>NULL or Not(Isnull(xx))test.
regards,
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top