Access getting values from List Box using VBA

S

Seenfresh

I have encountered a weird problem, weird for me I guess.

I have two list boxes on a form and one list box has a row source referenced
to a query. In this list box I have code in the after update event which
grabes the the selected items from the list box and inputs a SQL statement
into a query. The second list box is dependant on the 1st listbox after
update event. The 2nd listbox populates based on the 1st Listboxes after
update events query. Up to this point everything works good. As I select
one or more items in the 1st list box the second list box repopulates with
relevant information. The problem is using vba code I can't seem to get the
values from the 2nd list box? Items are evident but when I use the exact
same code I used when I extracted values from the 1st list box is does not
work for the second the .itemdata(varitem) keeps returning nothing? even
though items exist?

Does anyone have any ideas on how to debug or solve this problem?

Any help would be greatly appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top