Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Visual Basic Coding Help: My code won't work at all


  • Please log in to reply

#1
Moon_Dew

Moon_Dew

    Member

  • Member
  • PipPip
  • 10 posts
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.

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

Edited by Moon_Dew, 07 November 2013 - 06:51 PM.

  • 0

Advertisements


#2
Moon_Dew

Moon_Dew

    Member

  • Topic Starter
  • Member
  • PipPip
  • 10 posts
Me again, just bumping this thread since no-one's replied yet. Kinda need this today so I could use a little help here, please.
  • 0

#3
Moon_Dew

Moon_Dew

    Member

  • Topic Starter
  • Member
  • PipPip
  • 10 posts
Okay, I got an extension on this project's due date, what I don't have is any help, so bumping this thread.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP