How do I fix this: Me.dgvData.DataSource = dt, there are three date of birth dropdown list

Private Sub RefreshData()
        If Not cnn.State = ConnectionState.Open Then
            'open connection
            cnn.Open()
        End If

        Dim da As New OleDb.OleDbDataAdapter("SELECT txtstdid as [ID], " & _
                                             "txtstdname as [Name], cbosex as [Gender], chodob1 as [Date Of Birth], chodob2 as [Date Of Birth], chodob3 as [Date Of Birth], txtic as [Identification Number Card], txtpassn as [Passport Number], txtpn as [Phone Number], dod1 as [Date Of Departure], dod2 as [Date Of Departure], dod3 as [Date Of Departure], txtaddress as [Address], txtaapoa [Address At Point Of Arrival] " & _
                                             " FROM plane ORDER by txtstdid", cnn)

        Dim dt As New DataTable
        'fill data to datatable
        da.Fill(dt)

        'offer data in data table into datagridview
        Me.dgvData.DataSource = dt

        'close connection
        cnn.Close()
    End Sub
Attachments 66096.png 172.94 KB 66112.png 153.65 KB

No0 need to mention Me.dgvData U can just say dgvData. And moreover what is the problem ur facing?

No0 need to mention Me.dgvData U can just say dgvData. And moreover what is the problem ur facing?

Hey, i just removed the Me. and the result is still the same. "dgvData" is not declared, and it maybe inaccessible due to its protection level. This is the only current problem I'm facing and searched for many helps in forum but couldn't get the answer :(
the link below is the one full version all my codes are inside please have a look thanks...
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/de721f35-c5a0-48cd-8214-b88aea01e292

In designer of the code check for Friend WithEvents dgvData as Datagridview. it should be there if not add. Or if its there then make it public
PUBLIC WithEvents dgvData as Datagridview

This question has already been answered. Start a new discussion instead.