FormLoad Stops
FormLoad Stops
FormLoad Stops
FormLoad Stops
FormLoad Stops
FormLoad Stops FormLoad Stops FormLoad Stops FormLoad Stops FormLoad Stops FormLoad Stops FormLoad Stops FormLoad Stops
FormLoad Stops FormLoad Stops
FormLoad Stops
Go Back  Xtreme Visual Basic Talk > > > FormLoad Stops


Reply
 
Thread Tools Display Modes
  #1  
Old 12-17-2014, 01:39 PM
sirmilt sirmilt is offline
Contributor
 
Join Date: Jan 2003
Location: Florida
Posts: 451
Question FormLoad Stops


I am using Visual Basic 2010. My form contains a datagridview and a number of bound controls.

The form Load code looks like this:
-----------------------------------------------------------------------------------------------------
Private Sub frmMusic_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
intCount = dgvMusic.RowCount - 1
lblResults.Text = "As you record or change Music in your collection, you will see messages in this area relating to the status of the function you have used."
'TODO: This line of code loads data into the 'MyCollectionsDataSet.tblMusic' table. You can move, or remove it, as needed.
Me.TblMusicTableAdapter.Fill(Me.MyCollectionsDataSet.tblMusic)
* GetCountAndCost()
* SetLoanControls()

End Sub
-----------------------------------------------------------------------------------------------------
My code starts perfectly, and continues through the display of the datagridview but then stops. The form is displayed properly as are the bound control, but the procedures (preceeded by an asterisk which is of course not in my actual code) following the filling of the datagridview are not accessed and never executed.

I have two other forms that basically follow the same procedures except that they access different tables. I can't find any code that interrupts the flow. Can Anyone help?

Milt
Reply With Quote
  #2  
Old 12-17-2014, 02:29 PM
CharlieMay's Avatar
CharlieMay CharlieMay is offline
Regular
 
Join Date: Sep 2009
Location: Indiana
Posts: 89
Default

Try wrapping that entire code into a Try...Catch block and display the exception in a messagebox to see if there is a first chance exception being thrown. Without a try catch form_load can bury some first chance exceptions leading you to believe things are working.

Also, have you stepped through the code as it executes to see what it's doing to lead you to believe that the * code isn't being executed?
__________________
I thought I knew what I was doing...
...And then I turned on Option Strict
Reply With Quote
  #3  
Old 12-17-2014, 03:48 PM
PlausiblyDamp's Avatar
PlausiblyDampFormLoad Stops PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Are you running on a 64bit of windows? If so it is a known problem (https://connect.microsoft.com/Visual...pment-machines)
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #4  
Old 12-18-2014, 02:11 PM
sirmilt sirmilt is offline
Contributor
 
Join Date: Jan 2003
Location: Florida
Posts: 451
Default

Thank you both for the responses. The answer to the problem was simple and due to my own carelessness.

A required field in the test data was blank(I had changed the requirement after the test data was in the file).

When this came to light I changed the field to accept blanks and MY PROBLEM DISAPPEARED.

Milt
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
FormLoad Stops
FormLoad Stops
FormLoad Stops FormLoad Stops
FormLoad Stops
FormLoad Stops
FormLoad Stops FormLoad Stops FormLoad Stops FormLoad Stops FormLoad Stops FormLoad Stops FormLoad Stops
FormLoad Stops
FormLoad Stops
 
FormLoad Stops
FormLoad Stops
 
-->