List box value keeps coming up null

DatabaseDuane
DatabaseDuane used Ask the Experts™
on
I have a search form with a listbox that automatically populates as you update the fields (last, address, etc). My objective is that the first item in the list will be the default item in the list so I put

Me.listFoundRecords.Selected(0) = True

after the search function happens.

My problem is that even though the record appears to be selected (it is highlighted), the value of the listbox is still null unless I click on the record. Any thoughts?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Your statement only highlights the first value.  Use the default property to set the control.
Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010

Commented:
Do you have the listboxes column headers displayed?  If so, change the index from 0 to 1.

Author

Commented:
Thanks. That did it.

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