List empty status

Joy83

Member
Local time
Today, 04:30
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
 
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
 
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
 
use lstListbox.ListCount
if 0 then empty.
 

Users who are viewing this thread

Back
Top Bottom