Hello,
can you help me please, how can be my newly added data to be selected in my listview after i clicked my Add button.Please help me.
Thank you in advance hoping for your positive response.
here is my code.
Private Sub cmdadd_Click()
Dim Objlist as ListItem
sql = "INSERT INTO Customer(id,Name,familyName,Address) VALUES('" & lngId & "','" & txtname & "', '" & txtfamilyname & "','" & txtaddress & "')"
con.Execute sql
GetData lvwIP
//This Three Lines is not working
Set Objlist = lvwIP.ListItems.Add(, , txtname.Text)
Newlist Objlist
Set lvwIP.SelectedItem = Objlist
//I have problem in here,It will not select the newly added data
End Sub
Private Sub Newlist(list As ListItem)
With list
.Text = txtname.Text
.SubItems(1) = txtfamilyname.Text
.SubItems(2) = txtaddress.Text
End With
End Sub