Is Modality even a word?

Anyway...

I'm making an app that adds defects found while testing to a database. I have a form that adds the info to a database as a child in an MDI container. Once we post the fix for the defect, I need to update that row in the database with new information. I have another child form that does that.

Sometimes procedures are overlooked and I end up trying to post a defect that has not been added yet. In this case, I pop up the "add defect" form as an MDI child. I want to make it so that when I hit the submit button on the "add defect" form, it adds the defect to the database and then the "post defect" form can finish updating the information.

So first I tried this:

VB Code:
  1. Dim addDefect As New ChildForm5
  2. addDefect.MdiParent = Me.MdiParent
  3. addDefect.TextBox1.Text = TextBox1.Text
  4. addDefect.Show()
  5.  
  6. Dim UpdateCommand As OleDb.OleDbCommand = New OleDb.OleDbCommand("PostDefect", myOleDbConnection)
  7. UpdateCommand.CommandType = CommandType.StoredProcedure
  8. Dim objParam As OleDb.OleDbParameter = New OleDb.OleDbParameter
  9.  
  10. objParam = UpdateCommand.Parameters.Add("@DefectState", OleDb.OleDbType.BSTR)
  11. objParam.Direction = ParameterDirection.Input
  12. objParam.Value = 1
  13.  
  14. etc...

but with the .Show(), the app blows right past it and tries to update the row before it is added. If I use .ShowDialog() to halt execution of the "post defect" form I get an exception with the parent form. However, if I comment out the line assinging the "add defect" form a parent, it works, but the new window is no longer contained in the parent form. Is there a way to get around this?