0

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
2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by firoz.raj
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.