Close Report Open Form

CanWest

Registered User.
Local time
Today, 13:00
Joined
Sep 15, 2006
Messages
272
Here is my delima. I have many reports in this database. On the OnClose Event I hvae the following Code

Code:
Private Sub Report_Close()

    DoCmd.OpenForm "frm_MainMenu", acNormal, "", "", , acNormal
    TabCtl0.Value = 3
    
End Sub

The idea behind the second line is to go to a specific tab on the tab control. I know I could do this on the onopen event of the form but the problem is I don not Always want to go to that tab when the form is opened. Only when it is being opened from a reports on close event.

Unfortunately the code as it stands does not work.

Any Ideas??
 
Hi
Try this:
Code:
DoCmd.OpenForm "frm_MainMenu", acNormal, "", "", , acNormal
Forms("frm_MainMenu").SetFocus
Forms.frm_MainMenu.Form.TabCtl0.Value = 3
DoCmd.Close , Me.Name
 

Users who are viewing this thread

Back
Top Bottom