What mean that error?
can someone help me?
The connection was not closed. The connection's current state is open
Private Sub btnCari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCari.Click
con.Open()
sql = ("SELECT * FROM RekodAnggaran WHERE [NoIC]='" & txtNoIC.Text & "'")
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "RekodAnggaran")
If ds.Tables("RekodAnggaran").Rows.Count < 1 Then
MsgBox("Nombor IC yang dimasukkan tiada didalam rekod.")
txtNoIC.Clear()
Else
txtNama.Text() = ds.Tables("RekodAnggaran").Rows(0).Item("Nama")
cmbPremium.Text = ds.Tables("RekodAnggaran").Rows(0).Item("Umur")
txtAlamat.Text = ds.Tables("RekodAnggaran").Rows(0).Item("Alamat")
txtTarikhLahir.Text = ds.Tables("RekodAnggaran").Rows(0).Item("TarikhLahir")
txtTarikhMI.Text = ds.Tables("RekodAnggaran").Rows(0).Item("TarikhMI")
cmbPelan.Text = ds.Tables("RekodAnggaran").Rows(0).Item("Pelan")
txtNoTelefon.Text = ds.Tables("RekodAnggaran").Rows(0).Item("NoTelefon")
cmbJPembayaran.Text = ds.Tables("RekodAnggaran").Rows(0).Item("JPembayaran")
lblPremium.Text = ds.Tables("RekodAnggaran").Rows(0).Item("PremiumTahunan")
lblPremiumJP.Text = ds.Tables("RekodAnggaran").Rows(0).Item("PremiumJP")
Return
End If
con.Close()
End Sub