Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox3.SelectedIndexChanged
txtdayattended.Enabled = True
sql = " select work_day from tbl_yearset where month='" & ComboBox3.Text & "'"
If rs.State = 1 Then rs.Close()
rs.Open(sql, conn)
If rs.EOF = False Then
txtworkday.Text = rs(0).Value
End If
End Sub
Please let me know how to write this code for an oledb connection????