Edit Listview Subitem In Vb6 Source

Автор:

VB6 How to edit a record in listview. Data Source=' & pathx conn_mod.Open End Sub Public Sub openUsers(). Display records in each subitem in listview in vb6. Ok, so I have a listview on one form, and when a button is pressed it opens up a new form with the contents of the selected listview item and it's subitems in a.

Edit Listview Subitem In Vb6 Source

What i can do to click in item 1 or in subitem1 or subitem 2 whatever i click in this 3 'items' and get the same result? (textbox2 the subitems 1 and in textbox3 the subitem 2.) The code you have posted is not the important bit.

You need to post the code that is calling this method. IF you have included this call in the ListView 'SelectedIndexChanged' event then it will execute whenever the selection moves from one line of the list view to another - that seems to be what you need. So if it's not working now, then perhaps you are calling this method from some other event.

That's why you need to show how this code is being called. Aplikasi Sistem Pakar Dengan Phproxy.

OK so im really desperate or i wouldn't have brought this up. My project (stock control) uses a listview to keep show the records in a Microsoft access database. Most of the controls i have figured out to help me: create new records, delete records and so on. However i cant EDIT/UPDATE already existing records.

When i try to EDIT/UPDATE an existing record, a new record is created and completely replaces the first record in the table, so i would end up with 2 almost similar records and the first record in the table replaced. Private Sub editrec() 'This is the code that SHOULD update and overwrite the exsiting record but it doesnt work rsStocks!Itname = txts_2.Text rsStocks!ItPrice = txts_3.Text rsStocks!InStock = txts_4.Text rsStocks!OrderLvl = txts_5.Text rsStocks!Supplier = txts_6.Text rsStocks!ID = dlg_stk.Text rsStocks!Dull = 'q' rsStocks.Update end sub And this is how the editrec private sub gets called upon. Private Sub dlg_ok_Click() If (txts_2.Text = ') Or (txts_3.Text = ') Or (txts_4.Text = ') Or (txts_5.Text = ') Or (txts_6.Text = ') Then aflag = True MsgBox ('please fill the appropriate fields!'