Hi, cancan someone help me with my problem?
I am using vb 6.0 and MS Access 2003. I have a form where all the data in the database should display. The problem is, I don't know why my code is not working.
here it is:
Private Sub Form_Load()
Dim list As ListItem
ListView1.ListItems.Clear
Set rs = New Recordset
rs.open "select* from tblname", cn, adOpenDynamic, adLockOptimistic
Do Until rs.EOF
Set list = ListView1.ListItems.Add(, ,!RecordNumber)
lista.ListItems.SubItems(1) = !Firstname
lista.ListItems.SubItems(2) = !Lastname
lista.ListItems.SubItems(3) = !Birthdate
rs.MoveNext
Loop
End Sub
And if I input the lastname, firstname and date of birth (using a DTPicker), the saved data will appear in the listview.
Please help. Thank you.