J
John
I have a form with a command button that opens another form. The forms are
frmProjectCost (parent form), and frmJobTotal (Child). When the command
button is clicked on the parent form, I want to hid it from view. In the "on
click" event I put the following code:
Me.Form.Visible = False
DoCmd.OpenForm "frmJobTotal", acNormal, , , acFormEdit, acWindowNormal
This hides the parent form and launches the chile. I want to hide the parent
because it has data on it I would like to use on the child form. So the
question is, How do I get data from the parent form? Is the syntax:
forms!frmProjectCost.cmdCurMon.value
to get the value of the command button cmdCurMon?
Also, when the users exits the child form, how shoud I make the parent form
visible again? What I did was add this to the "on close" event:
Private Sub Form_Close()
If CurrentProject.AllForms("frmProjectCost").IsLoaded Then
Forms!frmProjectCost.Visible = True
Else
DoCmd.OpenForm "frmProjectCost", acNormal, , , acFormReadOnly
End If
End Sub
frmProjectCost (parent form), and frmJobTotal (Child). When the command
button is clicked on the parent form, I want to hid it from view. In the "on
click" event I put the following code:
Me.Form.Visible = False
DoCmd.OpenForm "frmJobTotal", acNormal, , , acFormEdit, acWindowNormal
This hides the parent form and launches the chile. I want to hide the parent
because it has data on it I would like to use on the child form. So the
question is, How do I get data from the parent form? Is the syntax:
forms!frmProjectCost.cmdCurMon.value
to get the value of the command button cmdCurMon?
Also, when the users exits the child form, how shoud I make the parent form
visible again? What I did was add this to the "on close" event:
Private Sub Form_Close()
If CurrentProject.AllForms("frmProjectCost").IsLoaded Then
Forms!frmProjectCost.Visible = True
Else
DoCmd.OpenForm "frmProjectCost", acNormal, , , acFormReadOnly
End If
End Sub