Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8299821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:18:18+00:00 2026-06-08T16:18:18+00:00

I have a form load sub routine here and the problem is that the

  • 0

I have a form load sub routine here and the problem is that the program executes the first one (namely, LoadProgrammes()) and then skips the rest of the subroutine. There is something about the subroutine LoadProgrammes() that makes the rest of “Form Load” not get called.

The same goes for ListActiveClasses(). Only DisplayGroups() is called properly and the next line of code is called.

I literally have no idea why and it is extremely difficult to find a google solution. Thanks in advance to whomever can help.

Private Sub frmEnroll_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    LoadProgrammes()
    ListActiveClasses()
    DisplayGroups()

End Sub

Private Sub LoadProgrammes()
    Dim strLoadSQL As String
    Dim dsLoad As New DataSet
    Dim daLoad As OleDb.OleDbDataAdapter

    Using con As New OleDbConnection(My.Settings.ConnectionPath)

        strLoadSQL = "SELECT Programme FROM Programmes"
        daLoad = New OleDb.OleDbDataAdapter(strLoadSQL, con)
        daLoad.Fill(dsLoad, "LoadProgrammes")

        'Add items to the combobox
        For i = 0 To dsLoad.Tables("LoadProgrammes").Rows.Count
            cmbProgramme.Items.Add(dsLoad.Tables("LoadProgrammes").Rows(i).Item(0))
        Next

    End Using
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T16:18:20+00:00Added an answer on June 8, 2026 at 4:18 pm

    What I have seen, is that in some event handlers (maybe like your Form.Load handler), any exception that is thrown during execution will simply be swallowed, and ignored. Most likely you are getting some exception in your OleDb code, that is causing it to bail out.

    I would recommend wrapping all of your _Load subroutine with a Try…Catch block, and manually printing out the exception, or calling Debugger.Break.

    Have you tried stepping through the code? I would recommend that you set a breakpoint at the beginning of frmEnroll_Load, and start stepping through until something blows up, or the code just continues (which is what you would see if the exception was getting swallowed.)


    Related questions / pages:

    • Silent failures in C#, seemingly unhandled exceptions that does not crash the program
    • Why the form load can’t catch exception?
    • Why is my exception being swallowed in my Form’s Load handler?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a nested form in my app that uses AJAX to load an
I have this problem, when I load my form, the validation messages appears in
I have two form. One will display records form a RecordSet that the other
I have a child form that is throwing an ApplicationException in the Load event
I have a form with a DataGridView and I want to load data from
I have this form submit code: Event.observe(window, 'load', init, false); function init() { Event.observe('addressForm',
I have a pictureBox on a Windows Form. I do the following to load
I have form where are 2 input fields and then i have dynamic dataTables
I have a splash screen on the application and on that form. I have
I have a form which contains a checkbox field. On page load I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.