Situation:
I have a form that inputs records to a database. When I want to put in information found in a supporting table, I use a Modal form to search the table (on SQL Server 7) and move the information found in the search results back to the original form. After querying the supporting table, I move the information from the grid of search results found to the fields the user inputs their search requirements to and when the Modal form is closed, it sends the foreign information to the fields it needs to go in.
Problem:
When I close the form, it should take information from the current form and move it back into the original form. As seen in the below code, I get a new instance of the form with the information I wanted in it instead of the instance of the form that originally called the saved within the record I am creating.
Question(s):
How do I reference different instances of the form?
How can I tell which instance is which?
How do I tell the form which instance I want filled in?
(I thought ActiveForm may be of use in the MDI but I must not know how to use it or it didn't like how I used it)
(Thanks in advance!) ****************
DariceLR
:-{} :-V :-x
****************
I have a form that inputs records to a database. When I want to put in information found in a supporting table, I use a Modal form to search the table (on SQL Server 7) and move the information found in the search results back to the original form. After querying the supporting table, I move the information from the grid of search results found to the fields the user inputs their search requirements to and when the Modal form is closed, it sends the foreign information to the fields it needs to go in.
Problem:
When I close the form, it should take information from the current form and move it back into the original form. As seen in the below code, I get a new instance of the form with the information I wanted in it instead of the instance of the form that originally called the saved within the record I am creating.
Code:
Private Sub cmdOk_Click()
'What do I do to pull the information out of the data grid?
'The following line of code makes the new instance of the form "frmNewRequest"
'one instance of form
frmNewRequest.txtDeveloperSSN = "102938838"
'two instances of form
'Closes Form... and opens a new request... don't want that...
Me.Hide
'Unload Me
End Sub
Question(s):
How do I reference different instances of the form?
How can I tell which instance is which?
How do I tell the form which instance I want filled in?
(I thought ActiveForm may be of use in the MDI but I must not know how to use it or it didn't like how I used it)
(Thanks in advance!) ****************
DariceLR
:-{} :-V :-x
****************