When the user selects the combobox type, the information will display at the label like this.



However, when I run it, it display like this.



By right, the labels i created should display with the information in the database. I have check my database and all the values are there. Who can help me solve whats wrong with it and what should I do?

Here are the codes:

VB Code:
  1. Public Class fine
  2.  
  3.     Private Sub fine_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  4.         Dim strcon As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source =C:\temp\db1.mdb"
  5.         Dim con As OleDb.OleDbConnection
  6.         Dim dr As OleDb.OleDbDataReader
  7.         Dim cmd As New OleDb.OleDbCommand
  8.         Try
  9.             Dim strselect As String = "Select * from fine where BorrowerId = '" & Form1.tbxID.Text & "'"
  10.  
  11.             'create a new connection
  12.             con = New OleDb.OleDbConnection(strcon)
  13.             con.Open()
  14.             cmd.Connection = con
  15.             cmd.CommandText = strselect
  16.             dr = cmd.ExecuteReader
  17.  
  18.             If dr.Read Then
  19.                 tbxname.Text = dr("memberName")
  20.                 tbxadmin.Text = dr("BorrowerId")
  21.                
  22.             End If
  23.             dr.Close()
  24.  
  25.             dr.Close()
  26.         Catch eException As Exception
  27.             MessageBox.Show(eException.Message)
  28.         End Try
  29.  
  30.  
  31.     End Sub
  32.  
  33.     Private Sub cbxtype_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxtype.SelectedIndexChanged
  34.         Dim strcon As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source =C:\temp\db1.mdb"
  35.         Dim con As OleDb.OleDbConnection
  36.         Dim dr As OleDb.OleDbDataReader
  37.         Dim cmd As New OleDb.OleDbCommand
  38.         Try
  39.             Dim strselect As String = "Select * from fine where fineType = '" & cbxtype.Text & "' And BorrowerId = '" & Form1.tbxID.Text & "'"
  40.  
  41.             'create a new connection
  42.             con = New OleDb.OleDbConnection(strcon)
  43.             con.Open()
  44.             cmd.Connection = con
  45.             cmd.CommandText = strselect
  46.             dr = cmd.ExecuteReader
  47.  
  48.             If dr.Read Then
  49.                 lblID.Text = dr("fineId")
  50.                 lblitem.Text = dr("itemId")
  51.                 lbltitle.Text = dr("itemTitle")
  52.                 lbldue.Text = dr("dueDate")
  53.                 lblreturn.Text = dr("dateReturn")
  54.                 lbloverdue.Text = dr("daysOverdue")
  55.             End If
  56.             dr.Close()
  57.  
  58.             dr.Close()
  59.         Catch eException As Exception
  60.             MessageBox.Show(eException.Message)
  61.         End Try
  62.  
  63.     End Sub
  64. End Class