ItemSelected Problems

  • Thread starter Thread starter Eddy
  • Start date Start date
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.
 
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)?
 
Back
Top