List empty status (1 Viewer)

Joy83

Member
Local time
Yesterday, 17:11
Joined
Jan 9, 2020
Messages
116
Hi
How to check if the list is empty and has no data

if I put len or value=0 It works only if I select a record
I just need to make sure that the list is empty without selecting any record
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:11
Joined
May 7, 2009
Messages
19,245
what is the list, listbox?
you can DCount() the source table of the list to find out if it has any record?

If DCount("1","table1") <> 0 Then
'there is record in table1
Else
'no record
End If
 

Joy83

Member
Local time
Yesterday, 17:11
Joined
Jan 9, 2020
Messages
116
I am not reading from any table
I am just saving data in the list by adding them through a text box an a button to move the text to the list
I just need to creat a check before I save that the list is not empty
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:11
Joined
May 7, 2009
Messages
19,245
use lstListbox.ListCount
if 0 then empty.
 

Users who are viewing this thread

Top Bottom