Hi. Heres my entire code for the project, I doubled checked over and as far as I can see all connections get close once, or even twice to double check.

vb Code:
  1. Imports System.Data.OleDb
  2. Imports System.IO
  3. Module modCourses
  4.     Public Function CreateCourse(ByVal DBDirectory As String) As Boolean
  5.         Dim DB As New ADOX.Catalog()
  6.         Try
  7.             With frmNewEditCourse
  8.                 DB.Create(Connection.ConnectionString)
  9.                 SQL = "CREATE TABLE [Information] ([CIndex] AutoIncrement, [CourseCode] TEXT(50), [RoomNumber] TEXT(50), [SchoolYear] TEXT, [Teacher] Text)"
  10.                 Command = New OleDbCommand(SQL, Connection)
  11.                 Command.Connection.Open()
  12.                 Command.ExecuteNonQuery()
  13.                 Command.Connection.Close()
  14.                 SQL = "INSERT INTO [Information] (CourseCode, RoomNumber, SchoolYear, Teacher) VALUES (?, ?, ?, ?); "
  15.                 Command = New OleDbCommand(SQL, Connection)
  16.                 Command.Connection.Open()
  17.                 Command.Parameters.AddWithValue("CourseCode", .txtCourseCode.Text)
  18.                 Command.Parameters.AddWithValue("RoomNumber", .txtRoomNumber.Text)
  19.                 Command.Parameters.AddWithValue("SchoolYear", .txtSchoolYear.Text)
  20.                 Command.Parameters.AddWithValue("Teacher", .txtTeacher.Text)
  21.                 Command.ExecuteNonQuery()
  22.                 Connection.Close()
  23.                 frmCourses.lstCourses.Items.Add(.txtCourseCode.Text)
  24.             End With
  25.         Catch Excep As System.Runtime.InteropServices.COMException
  26.         Finally
  27.             DB = Nothing
  28.             Connection.Close()
  29.         End Try
  30.     End Function
  31.     Public Sub NewCourse()
  32.         With frmNewEditCourse
  33.             DatabaseName = Application.StartupPath & "\Data\Courses\" & .txtCourseCode.Text & ".mdb"
  34.             Connection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & DatabaseName)
  35.             If File.Exists(DatabaseName) = True Then
  36.                 frmCourses.lblStatus.Text = "Error: Course " & .txtCourseCode.Text & " Already Exists."
  37.             Else
  38.                 CreateCourse(DatabaseName)
  39.                 frmCourses.lblStatus.Text = "New Course Sucessfully Created."
  40.             End If
  41.             Connection.Close()
  42.         End With
  43.     End Sub
  44.     Public Sub EditCourse()
  45.  
  46.     End Sub
  47.     Public Sub DeleteCourse()
  48.         With frmCourses
  49.             Dim CourseName As String = .lstCourses.SelectedItem
  50.             If .lstCourses.SelectedIndex >= 0 Then
  51.                 If MessageBox.Show("Are you sure you want to delete " & CourseName & "?", "Delete Course: " & CourseName & "?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
  52.                     File.Delete(Application.StartupPath & "\Data\Courses\" & CourseName & ".mdb")
  53.                     .lstCourses.Items.RemoveAt(.lstCourses.SelectedIndex)
  54.                 End If
  55.             Else
  56.                 MessageBox.Show("Please select a course to delete", "Select Course to Delete.")
  57.             End If
  58.         End With
  59.     End Sub
  60.     Public Sub LoadToListCourse()
  61.         With frmCourses
  62.             Dim FileNames() As String = Directory.GetFiles(Application.StartupPath & "\Data\Courses\")
  63.             Dim FileName As String
  64.             For i As Integer = 0 To FileNames.Length - 1
  65.                 FileName = Path.GetFileName(FileNames(i))
  66.                 If Path.GetExtension(FileName) = ".mdb" Then
  67.                     Connection = New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & FileNames(i))
  68.                     SQL = "SELECT CourseCode FROM Information"
  69.                     Command = New OleDbCommand(SQL, Connection)
  70.                     Command.Connection.Open()
  71.                     Reader = Command.ExecuteReader()
  72.                     While Reader.Read = True
  73.                         .lstCourses.Items.Add(Reader("CourseCode").ToString())
  74.                     End While
  75.                     Command.Connection.Close()
  76.                 End If
  77.             Next
  78.         End With
  79.     End Sub
  80.     Public Sub LoadToEditCourse()
  81.         With frmNewEditCourse
  82.             Dim FileName As String = Application.StartupPath & "\Data\Courses\" & frmCourses.lstCourses.SelectedItem & ".mdb"
  83.             Connection = New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & FileName)
  84.             SQL = "SELECT * FROM Information"
  85.             Adapter = New OleDbDataAdapter(SQL, Connection)
  86.             DS = New DataSet()
  87.             Adapter.Fill(DS)
  88.             Dim DRow As DataRow = DS.Tables(0).Rows(0)
  89.             If DS.Tables(0).Rows.Count > 0 Then
  90.                 .txtCourseCode.Text = DRow.Item("CourseCode").ToString()
  91.                 .txtRoomNumber.Text = DRow.Item("RoomNumber").ToString()
  92.                 .txtSchoolYear.Text = DRow.Item("SchoolYear").ToString()
  93.                 .txtTeacher.Text = DRow.Item("Teacher").ToString()
  94.             End If
  95.             Connection.Close()
  96.         End With
  97.     End Sub
  98. End Module