Click to See Complete Forum and Search --> : Closing one form, but need to re-entering later


Catrina
April 5th, 2000, 10:55 AM
I have a main form (Menu) that has a Option button to
take the user to another form. Code:

private Sub optHeader_DblClick()
If optHeader.Value = true then
Load frmHeader1

End If
End Sub



The Form_Load code for frmHeader1 is:

private Sub Form_Load()
frmHeader1.Show
Message = InputBox$("Enter Message for Printing on Check Stub", "Check Stub Message")
Deduct = MsgBox("Do You Wish to Block Any Deductions This Pay Period?", vbYesNo + vbDefaultButton2)
Report = MsgBox("Do You Wish to Override Your Normal Report Requests?", vbYesNo + vbDefaultButton2)
fraDate.Visible = true

End Sub



Information is then added by the user from controls in the frame fraDate. After the info is entered, I want a way to close this form and show the Menu again. I can accomplish this, but it will not let me go back into the frmHeader1 a second time. I need to be able to got back into that form as many times as possible. Thank you in advance.

Catrina

kstefanski
April 5th, 2000, 11:24 AM
I don't know if you are unloading frmHeader1 when you close it or not, so the form may already be loaded, just not shown. After loading the form, use

frmHeader1.Show




If you want to display the form as a modal form, then use

frmHeader1.show vbmodal




Hope this helps.
Kymberlie

Catrina
April 5th, 2000, 11:25 AM
I got the immediate problem fixed, but need to know if there is a way to get rid of close X in the corner. I want the user to only be able to use my exit button. Thanks

Catrina

kstefanski
April 5th, 2000, 11:27 AM
Set the ControlBox property of the form to False. This will remove the min, max, and restore buttons from the upper right corner of the form.

Kymberlie