|
-
Oct 25th, 2017, 01:04 AM
#3
Thread Starter
Fanatic Member
Re: Unwanted trigger of an event.
Thanks JM. I can see how that works. I discovered this problem when I was playing around with the code. In the code above I originally had an If Branch around the method i.e. I was looking to make sure that the variable I was using was defined with what I wanted. and it turned out that the variable was = Nothing, obviously due to the fact that I set the SelectedIndex = -1. So anyway, I no longer needed the branch or the Try Catch, got rid of them and the code was reverted to what you see above.
Now stay with me here. I can run that code now and It works exactly as I had thought it should. So there is something more going on here. At that point I stepped through the code and it does exactly what it did before except it appears to go through a second time (that is the best I can figure it out) and the form Displays like screen shot one, except with an empty combobox, which I can then make a selection from and get the second window seen above. WDF!!! I am so confused!
Code:
Try
If Me.TblEmployeeTableAdapter.FillByDepartment(Me._MasterBase4_0ItemMasterDataSet.tblEmployee, glbstrDept) = Nothing Then
Throw error
EndIf
Catch
Message
End Try
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|