Q: Why do I get this exception when querying an Access database? I need a little help here please lend me a hand. I want to fill my combo box with the data coming from my database. I'm using MS access. What I'm trying to do is fill my combo box with just a name or just a single column from my database. I'm having a hard time achieving this.
Private Sub Judges_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    With cmd
        .Connection.Open()
        .CommandText = "SELECT FullName FROM Judges"
        rdr = cmd.ExecuteReader

        While rdr.Read()
            cmbJudges.Items.Add(rdr("FullName"))
        End While
        .ExecuteNonQuery()
        .Connection.Close()
        rdr.Close()

    End With

End Sub

But I'm having an error which is like this:
System.NullReferenceException: 'Object reference not set to an instance of an object.'

System.Data.OleDb.OleDbCommand.Connection.get returned Nothing

I don't understand this and it's pointing to my connection statement.

A: I already found the solution
Dim rdr as  OleDb.OleDbDataReader
Dim con As OleDb.OleDbConnection = New OleDb.OleDbConnection("Provider = Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\athan\Documents\PAGEANT.accdb")
Try

            With cmd
                .Connection = con
                .Connection.Open()
                .CommandText = "SELECT FullName from Judges"
                rdr = cmd.ExecuteReader

                While rdr.Read
                    cmbJudges.Items.Add(rdr.Item(0))
                End While
                rdr.Close()
                .Connection.Close()

            End With

        Catch ex As Exception

            Dim test = MsgBox(ex.Message)


        End Try

Thank you for your feedback. Next time I post a question I'll keep in mind what you all have said.

A: Connections are precious resources. They need to be opened at the last possible moment (right before the .Execute... method) and closed and disposed as soon as possible. 
Some database objects like Connection and Command use unmanaged resources behind the scenes. They will release these resources in their .Dispose method. To save us from having to .Close and .Dispose these object we have Using...End Using blocks which handle this chore for us even if there is an error. In this code both the connection and the command are handled by a single Using block.
I have shortened the code by passing the connection string directly to the constructor of the connection and likewise passing the command text and connection directly to the constructor of the command.
As long as a reader is active the connection must remain open. I used a DataTable that I could quickly load with a reader and then close the connection with End Using. Then we update the user interface by setting the .DisplayMember to the field name and setting the DataSource to the DataTable.
Private Sub FillComboBox()
    Dim dt As New DataTable
    Using con As New OleDbConnection("Provider = Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\athan\Documents\PAGEANT.accdb"),
            cmd As New OleDbCommand("SELECT FullName from Judges", con)
        Try
            con.Open()
            dt.Load(cmd.ExecuteReader)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Using
    ComboBox1.DisplayMember = "FullName"
    ComboBox1.DataSource = dt
End Sub

