all groups > dotnet compact framework > january 2006 >
You're in the

dotnet compact framework

group:

ArgumentNullException


ArgumentNullException Scott Toney
1/31/2006 9:56:14 AM
dotnet compact framework:
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

Please disregard prior post Scott Toney
1/31/2006 11:18:05 AM
I was binding controls to a dataset that didn't have data.

[quoted text, click to view]

AddThis Social Bookmark Button