S
Scott Toney
I am calling showdialog to show a form using the following code:
Private sub miAdd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles miAdd.Click
Cursor.Current = Cursors.WaitCursor
AddEditForm = New frmAddEdit
AddEditForm.NewPatient = True
AddEditForm.Searching = False
AddEditForm.ShowDialog()
MessageBox.Show("A")
LoadList()
Cursor.Current = Cursors.Default
End Sub
On my AddEditForm, in my Return Menu Item I have:
Private Sub miReturn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles miReturn.Click
If (NewEntry) And (Not Save1) Then
InsertData(sender, e)
End If
Try
MessageBox.Show("1")
frmAddEdit_Save(sender, e)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
MessageBox.Show("C")
Me.Close()
End Sub
I get the messagebox.show for 1 and C, but get an argumentnullexception
after the messagebox.show("C") and do not get the Messagebox.show("A").
Being new to this, I'm sure that it is a programming error but have run out
of places to look. Any ideas would be greatly appreciated.
TIA
Scott
Private sub miAdd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles miAdd.Click
Cursor.Current = Cursors.WaitCursor
AddEditForm = New frmAddEdit
AddEditForm.NewPatient = True
AddEditForm.Searching = False
AddEditForm.ShowDialog()
MessageBox.Show("A")
LoadList()
Cursor.Current = Cursors.Default
End Sub
On my AddEditForm, in my Return Menu Item I have:
Private Sub miReturn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles miReturn.Click
If (NewEntry) And (Not Save1) Then
InsertData(sender, e)
End If
Try
MessageBox.Show("1")
frmAddEdit_Save(sender, e)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
MessageBox.Show("C")
Me.Close()
End Sub
I get the messagebox.show for 1 and C, but get an argumentnullexception
after the messagebox.show("C") and do not get the Messagebox.show("A").
Being new to this, I'm sure that it is a programming error but have run out
of places to look. Any ideas would be greatly appreciated.
TIA
Scott