it would probably be easiest if you would post the exact code where you are calling your "GetFilePath" function.
GetFilePath is called from the Load event.
Code:
Private Sub staffRecord_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Select Case MyState
Case "Add"
lblStaffID.Text = GetNewID.GetStaffID(StaffID).ToString 'Acquires StaffID from appropriate setTable.
rdoActive.Checked = True 'New Employee is active.
lblStart.Text = CStr(Date.Today) 'Employee Start Date = Now
lblFilePath.Text = GetFilePath(MyDirectory, MyPath).ToString 'Derived FilePath directory.
SetState("Add") 'Set control and form properties
Case Else
GetStaffRecord(StaffID) 'queries MasterBase.FileTable for record with colStaffID value matching the StaffID value.
If MyState = "Edit" Then SetState("Edit") Else SetState("View") 'Sets control and form properties.
BindControls() 'Binds data acquired from sitStaffMaster query to controls.
End Select
GetDeptComboBox()
End Sub
Yes, the misuse of dataset is not going to cause this problem. It's still a misuse though, because a datatable was always an option.
I have used them for quite awhile for comboboxes on forms. I suppose I should update my methods to eliminate their usage.
I am going try your suggestion with the breakpoint and see what that will yield.
MasterBaseQuery() is being called from somewhere else.
I have thought that too. I just didn't know how to look for that. Thanks for the suggestion on how to do that.
Based on the fact that Master.BaseQuery() is used so often and by so many different queries, I am still having a hard time accepting that the issue actually resides there. It is my belief that the issue lies in the code of GetFilePath(), or the code in the Load event leading up to the call for GetFilePath()