Checking for data in a List

John Sheehy
John Sheehy used Ask the Experts™
on
So I have a form with a list on it.  The list currently has data in it.
I also have two buttons on this from above the list.  Export and Create.  export will export the list out to an excel file and create will create the list.

The list should only need to be created once.  But if in the off chance the user wants to re-baseline their packages they could create the list again.

However this is where I am running into the error.  
I have an delete query that will delete the records from the list.  That part works just fine.
But how do I get the create button to check if the list is populated?

I tried the following:
If IsNull(me.control_list) then.......etc
But it thinks the list is empty all the time. Even when there is data in it.

How do I get it to check to see if the list has information in it.  

Thanks
John
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software & Systems Engineer
Commented:
With List i guess we are talking about Listbox... if this is the case :
Me.ListBox.ListCount

Open in new window

John SheehySystem Security Manager

Author

Commented:
Yes it is a Listbox. And that worked.  Thank you very much.
John SheehySystem Security Manager

Author

Commented:
Quick and Easy.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial