i am doing test program to understand how to fill a listview with information i enter in another form and also using VB6 but so far unsucessfull. in one form i am using an ADODC control to put information in an access database i have created the fields consist of ClientID, FirstName, LastName,Addres s, City, State. etc. on another form i have a Listview control. i want to know how i can get the information that i have entered in the first form onto the second form when i open it. so far i can only retrieve the fields of the first entry and not all the information in the database here is my code for the second form *Listview"
how can i get the rest of the information instead of just one. for example i enter in all the fields then save then enter in another set a fields and save it so now i have two separate information but when i open up the second form there is only the first line of information and not the second one how do i get then all to show. please help me with this code i show you
lee123
Code:
Private Sub Form_Load() Dim LHeader As ColumnHeader Dim LItem As ListItem lwidth = ListView1.Width - 5 * Screen.TwipsPerPixelX ListView1.ColumnHeaders.Add(1, , "ClientsID", lwidth / 7) = "Clients ID" ListView1.ColumnHeaders.Add(2, , "FirstName", lwidth / 4) = "First Name" ListView1.ColumnHeaders.Add(3, , "Lastname", lwidth / 4) = "Last Name" ListView1.ColumnHeaders.Add(4, , "Phone", lwidth / 5) = "Phone" ListView1.ColumnHeaders.Add(5, , "Cell", lwidth / 5) = "Cell" ListView1.View = lvwReport Set LItem = ListView1.ListItems.Add(1, , NewClients.ClientsID.Text) LItem.SubItems(1) = NewClients.FirstName LItem.SubItems(2) = NewClients.LastName LItem.SubItems(3) = NewClients.PhoneNumber LItem.SubItems(4) = NewClients.CellNumber End Sub
lee123
Comment