hi, can somebody help me?
i am using visual basic 6.0 with microsoft access 2003 database
i have a form that view the data from the database through the listview
my problem is it says
Compile Error:
Method or data member not found
heres my code

Private Sub Form_Load()
Dim list As ListItem
ListView1.ListItem.Clear
Set rcdset = New ADODB.Recordset
rcdset.Open "select * from Movies ", link, 3, 3
      Do While Not rs.EOF = True
         Set list = ListView1.ListItems.Add(, , rcdset!ID)
             list.SubItems(1) = rcdset!Title
             list.SubItems(2) = rcdset!Genre
             list.SubItems(3) = rcdset!Producer
             list.SubItems(4) = rcdset!Director
             list.SubItems(5) = rcdset!Year
             list.SubItems(6) = rcdset!Rating
         rcdset.MoveNext
       Loop
         rcdset.Close
End Sub

That could actually be

Do Until rcdset.EOF

and it would help if we knew what line was causing the error.

Edited 2 Years Ago by Reverend Jim

so i tried what you suggested

Private Sub Form_Load()
Dim list As ListItem
ListView1.ListItems.Clear
Set rcdset = New ADODB.Recordset
rcdset.Open "select * from Movies ", link, 3, 3
      Do Until rcdset.EOF
         Set list = ListView1.ListItems.Add(, , rcdset!ID)
             list.SubItems(1) = rcdset!Title
             list.SubItems(2) = rcdset!Genre
             list.SubItems(3) = rcdset!Producer
             list.SubItems(4) = rcdset!Director
             list.SubItems(5) = rcdset!Year
             list.SubItems(6) = rcdset!Rating
         rcdset.MoveNext
       Loop
         rcdset.Close
End Sub

still theres error saying
compile error
User-defined type not defined?

the highlight is

 Dim list As ListItem

i dont know why

This article has been dead for over six months. Start a new discussion instead.