I am using VS 2010, code in VB.net. For whatever reason, my Form1.Load (in my app, its called Form.JNA) wont run. It simply wont execute any of the code in that subroutine. Does anyone know why this is occurring?
My main form is called FormJNA. I dont know if including the beginning of the code helps, so here it is. I know its not working because boolConfirmed is never true and the textReqDate textbox is empty.
Private Sub FormJNA_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Close the database in case it was left open
All.rstRecordSet.Close()
All.conConnection.Close()
strEmailServer = All.GetEmailServer("tblEmailServer", "Server") 'retrieves the email name from JNADB
boolConfirmed = True 'set as true since there is no data to be confirmed. this prevents a popup window warning the user of unconfirmed data
'For live date in application window
Timer1.Start()
txtReqDate.Text = DateValue(Now)
....
...
..
.
When I insert a breakpoint I put it on that first comment line of code. When I run the program, it takes me to the breakpoint and there is that yellow arrow over the red dot. I press the button to move the arrow and the window opens, but then the yellow arrow disappears and I cant move anywhere further in the program unless I push one of the buttons on the main form. All of the other forms work and run just fine except for this one.
Your code is probably throwing an error that is not being reported.
Try wrapping everything with a Try Catch
Block and see what the exception is