tags:

views:

8

answers:

0

Hi everyone ive created an application and i cant seem to connect it to the database, and my list view is empty when I run the application can you please help me with the code, the following code is for listview

Private Sub CircuitsLvw_BeforeLabelEdit(Cancel As Integer)

Dim rs As New ADODB.Recordset

lblI.Caption = CircuitsLvw.ListItems(CircuitsLvw.SelectedItem.Index)

 rs.Open "Select * from Circuits where Id = " & Int(lblI) & "", con, 2, 3

 With rs

      ReferenceNotxt.Text = !ReferenceNo

      InstitutionNametxt.Text = !InstitutionName

      FullNametxt.Text = !FullName

      Contactstxt.Text = !Contacts

      ItemNametxt.Text = !ItemName

      SerialNumbertxt.Text = !SerialNumber

      ProblemInfotxt.Text = !ProblemInfo

      TechnicianNametxt.Text = !TechnicianName

      CollectorNametxt.Text = !CollectorName

End With

End Sub