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

Change the line no. 6 as

Do While Not rcdset.EOF = True

That could actually be

Do Until rcdset.EOF

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

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

Try changing list to myList.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.