I know I'm doing something wrong here, but my sleep deprived brain (had a minor family crises last night, had to stay up much longer than I normally do) just can't work it out.

The allButton click event is suppose to show all the records in the database, the codeButton click even is supposed to show only the records with a code of PG24, and the nameButton click event is supposed to show only the record with Java in the MagName cell.

Right now the only things working are the database and the exit button.

I'd attach the database, but the file's invalid.

Code:
Option Explicit On
Option Strict On
Option Infer On

Public Class MainForm

    Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'MagazinesDataSet.tblMagazine' table. You can move, or remove it, as needed.
        Me.TblMagazineTableAdapter.Fill(Me.MagazinesDataSet.tblMagazine)

    End Sub

    Private Sub exitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitButton.Click
        Me.Close()
    End Sub

    Private Sub allButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles allButton.Click
        Dim records = From code In MagazinesDataSet.tblMagazine
        Select code

    End Sub

    Private Sub codeButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles codeButton.Click
        Dim records = From code In MagazinesDataSet.tblMagazine
                      Where code.Code.ToUpper = "PG24"
                      Select code

    End Sub

    Private Sub nameButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles nameButton.Click
        Dim records = From magName In MagazinesDataSet.tblMagazine
                      Where magName.MagName.ToUpper = "Java"
                      Select magName
    End Sub
End Class