D
dave h
Hi,
I need to interate thru all the rows of a list box I just loaded. The first
field in table1 is an integer.
When I run this I get a type mismatch: (without the for...each it runs fine)
Dim myList as Control
Set myList = Me!aListBox
myList.RowSource = "Select * FROM table1 "
myList = myList.ItemData(0)
Dim firstField As Variant
For Each firstField In myList.Column(0) ' blows up here with type
mismatch
Next firstField
Any suggestions on what I'm doing wrong - thanks, Dave H
I need to interate thru all the rows of a list box I just loaded. The first
field in table1 is an integer.
When I run this I get a type mismatch: (without the for...each it runs fine)
Dim myList as Control
Set myList = Me!aListBox
myList.RowSource = "Select * FROM table1 "
myList = myList.ItemData(0)
Dim firstField As Variant
For Each firstField In myList.Column(0) ' blows up here with type
mismatch
Next firstField
Any suggestions on what I'm doing wrong - thanks, Dave H