|
-
Aug 13th, 2000, 07:41 PM
#1
Thread Starter
Lively Member
When my application loads it creates a record set from a database and fills a listview control with the information. For some reason when the app opens and the listview control fills only the first column of the first row fills and no more. If I move forward to the next record and back to the first it will fill the rest of the information, just not when the form loads. Here is the code:
Private Sub Fill_Assoc()
Dim ADDRESSBOOK As ListItem
ListView.ListItems.Clear
If rs_assoc.EOF = False Then
While Not rs_assoc.EOF
DoEvents
Set ADDRESSBOOK = ListView.ListItems.Add(, "A" & rs_assoc.AbsolutePosition, rs_assoc.Fields("FName"))
ADDRESSBOOK.SubItems(1) = rs_assoc.Fields("LName")
ADDRESSBOOK.SubItems(2) = rs_assoc.Fields("Address")
ADDRESSBOOK.SubItems(3) = rs_assoc.Fields("City")
ADDRESSBOOK.SubItems(4) = rs_assoc.Fields("State")
ADDRESSBOOK.SubItems(5) = rs_assoc.Fields("Zip")
ADDRESSBOOK.SubItems(6) = rs_assoc.Fields("WPhone")
ADDRESSBOOK.SubItems(7) = rs_assoc.Fields("HPhone")
ADDRESSBOOK.SubItems(8) = rs_assoc.Fields("CPhone")
ADDRESSBOOK.SubItems(9) = rs_assoc.Fields("Pager")
ADDRESSBOOK.SubItems(10) = rs_assoc.Fields("EMail")
Set ADDRESSBOOK = Nothing
rs_assoc.MoveNext
Wend
End If
End Sub
It stops at this line, ADDRESSBOOK.SubItems(1) = rs_assoc.Fields("LName") and moves onto the next sub without filling the rest of the columns. At this point the recordset does not appear to be eof. Does anyone have any ideas on this or seen this before? Any help would be greatly appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|