ItemSelected Problems

E

Eddy

I just upgraded from Access97 to Access2003 and my ItemSelected code no
longer works. The code I am using is:

For Each itm In cboFileNum.ItemsSelected
strFileNum = cboFileNum.ItemData(itm)

I Dimmed itm as Variant and strFileNum as String.
Even though I select a File number in cboFileNum the itm is empty and the
code exits the For/Each loop as if I have not selected a File Number.

Can anybody see how I messed up?
Thanks.
 
A

Allen Browne

The code should work.
To get a feel for what's happening, test ItemsSelected.Count

Presumably this listbox is unbound (nothing in its Control Source property)?
 

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

Similar Threads


Top