Ok, i got my program to work great on it's own. But when i import it
into my main program so users can access it i keep getting a type
mismatch on the second column, Here is my code:
Public Sub fill_list()
StudList.ListItems.Clear
If rs.RecordCount = 0 Then Exit Sub
While Not rs.EOF
Set lst = StudList.ListItems.add(, , rs(0))
For eX = 1 To 57
lst.SubItems(eX) = rs(eX) & ""
Next eX
rs.MoveNext
Wend
End Sub
Any advice would be great, the thing i really don't understand is that
why it works in it's own program?
TigerPilot - 28 Oct 2006 01:30 GMT
On Oct 27, 2:02 pm, craig.buchin...@gmail.com wrote:
> Ok, i got my program to work great on it's own. But when i import it
> into my main program so users can access it i keep getting a type
[quoted text clipped - 8 lines]
>
> Set lst = StudList.ListItems.add(, , rs(0))
And which line, prey tell, is the offending line? You can tell by
clicking on the 'debug' button when the msgbox comes up.
Of the cuff, I would check if you didn't 'dim'ed something with the
same name in the main program as you did in the second program. If you
did, change it in one of them.
Yoram
Jeff Johnson - 31 Oct 2006 16:16 GMT
> For eX = 1 To 57
> lst.SubItems(eX) = rs(eX) & ""
> Next eX
> Any advice would be great
ANY advice? Okay: 57 sub-items is waaay too much for a list view. Use a grid
if you need to display this much info.