CoolFactor
Technical User
I want to hide the main form whenever I click on command button on my form and then restore the main form when the user closes the form opened by the command button.
I have the following code on the On Click Event of my command button of my main form:
Private Sub Command148_Click()
Me.Visible = False
DoCmd.OpenForm "frm_Candidate Contributions Data Entry", OpenArgs:=Me.Name
End Sub
On the "frm_Candidate Contributions Data Entry," form I have the following code in the On Unload Event of the form:
Private Sub Form_Unload(Cancel As Integer)
Forms(Me.OpenArgs).Visible = True
End Sub
I have the following code on the On Click Event of my command button of my main form:
Private Sub Command148_Click()
Me.Visible = False
DoCmd.OpenForm "frm_Candidate Contributions Data Entry", OpenArgs:=Me.Name
End Sub
On the "frm_Candidate Contributions Data Entry," form I have the following code in the On Unload Event of the form:
Private Sub Form_Unload(Cancel As Integer)
Forms(Me.OpenArgs).Visible = True
End Sub