Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Controls / October 2006



Tip: Looking for answers? Try searching our database.

listview Type mismatch

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
craig.buchinski@gmail.com - 27 Oct 2006 19:02 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.