Can anyone tell me why this codes are not working. here is the code What i have written.Simple i want to modify listview data using modify button.Kindly
find the attachment also.

Private Sub Command2_Click()
 Dim con As ADODB.Connection
 Set con = New ADODB.Connection
 con.Open ("Provider=Mirosoft.Jet.OLEDB.4.0;Persist Security Info=False; Datasource=\\asfserver\itp$\product_tabletest.mdb")
 Set rs = New ADODB.Recordset
 Dim x As Integer
 If Not con Is Nothing Then
   For x = ListView1.ListItems.Count To 1 Step -1
   If ListView1.ListItems(x).Checked = True Then
      con.Execute "Select * from Supplier where Supplier_name=" & ListView1.ListItems(x).Text & ""
      Load Form9
      Form9.Show vbModeless
      Form9.Text1.Text = IIf(IsNull(rs!supp_type), "")
      Form9.Text2.Text = IIf(IsNull(rs!supplier_ID), "")
      Form9.Text3.Text = IIf(IsNull(rs!supplier_name), "")
      Form9.Text4.Text = IIf(IsNull(rs!contact_person), "")
      Form9.Text5.Text = IIf(IsNull(rs!contact_no), "")
      Form9.Text6.Text = IIf(IsNull(rs!supp_type), "")
      Form9.Text7.Text = IIf(IsNull(rs!office_address), "")
      Form9.Text8.Text = IIf(IsNull(rs!emails), "")
    End If
    Next
   End If

where is the code to modify.

the code only includes a select statement.

:) Resolved.

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.