S
Sam
Hi All,
On closing my form i have coded the on close event to 'show' the
previous form that was hidden upon opening this current form. this
works fine allowing me to keep the screen tidy. Unfortunately where i
fall over, is that the code 'shows' the previous form... but will not
then close the current form. code is as follows:
Private Sub cmdCloseForm_Click()
On Error GoTo Err_cmdCloseForm_Click
'show form
Forms![frmPerson].Visible = True
DoCmd.Close acForm, [frmEqualOpportunities]
Exit_cmdCloseForm_Click:
Exit Sub
Err_cmdCloseForm_Click:
MsgBox Err.Description
Resume Exit_cmdCloseForm_Click
End Sub
I am wondering if i have to fully declare the form i am closeing?
can anyone lend a hand to a novice : ) ?
Many thanks,
Sam
On closing my form i have coded the on close event to 'show' the
previous form that was hidden upon opening this current form. this
works fine allowing me to keep the screen tidy. Unfortunately where i
fall over, is that the code 'shows' the previous form... but will not
then close the current form. code is as follows:
Private Sub cmdCloseForm_Click()
On Error GoTo Err_cmdCloseForm_Click
'show form
Forms![frmPerson].Visible = True
DoCmd.Close acForm, [frmEqualOpportunities]
Exit_cmdCloseForm_Click:
Exit Sub
Err_cmdCloseForm_Click:
MsgBox Err.Description
Resume Exit_cmdCloseForm_Click
End Sub
I am wondering if i have to fully declare the form i am closeing?
can anyone lend a hand to a novice : ) ?
Many thanks,
Sam