J Joy83 Member Local time Yesterday, 23:51 Joined Jan 9, 2020 Messages 116 Apr 12, 2022 #1 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
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, 14:51 Joined May 7, 2009 Messages 20,302 Apr 12, 2022 #2 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
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
J Joy83 Member Local time Yesterday, 23:51 Joined Jan 9, 2020 Messages 116 Apr 12, 2022 #3 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
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, 14:51 Joined May 7, 2009 Messages 20,302 Apr 12, 2022 #4 use lstListbox.ListCount if 0 then empty.
J Joy83 Member Local time Yesterday, 23:51 Joined Jan 9, 2020 Messages 116 Apr 12, 2022 #5 It worked Thanks a lot!