Prev: Are there problems linking tables in mdb files with Access 2007 and SQL 2008 ?
Next: Report fails to print
From: Prakash on 14 Apr 2010 03:40 From a form I'm invoking a report. The report opens in preview mode. However, I'd like the user to be able to click the "close" button on the toolbar to shut the report preview ad go back to the form. The access toolbars and menus are switched off by me at the start of the application in my form_load event as follows: Private Sub Form_Load() 'Call RestoreMissingToolbars 'DoCmd.ShowToolbar "Menu Bar", acToolbarYes CurrentDb.Properties("StartupShowDBWindow") = False '==== Hide the database window ====== 'DoCmd.SelectObject acTable, , True 'DoCmd.RunCommand acCmdWindowHide '==================================== CommandBars.ActiveMenuBar.Enabled = False 'Turn Access' Menu Bar OFF !! End Sub Am I switching off these toolbars correcty and how to get the close button to be visible again ? Regads, Prakash.
From: Prakash on 14 Apr 2010 03:47 On Apr 14, 11:40 am, Prakash <prakashwadhw...(a)gmail.com> wrote: > From a form I'm invoking a report. The report opens in preview mode. > However, I'd like the user to be able to click the "close" button on > the toolbar to shut the report preview ad go back to the form. The > access toolbars and menus are switched off by me at the start of the > application in my form_load event as follows: > > Private Sub Form_Load() > 'Call RestoreMissingToolbars > > 'DoCmd.ShowToolbar "Menu Bar", acToolbarYes > CurrentDb.Properties("StartupShowDBWindow") = False > '==== Hide the database window ====== > 'DoCmd.SelectObject acTable, , True > 'DoCmd.RunCommand acCmdWindowHide > '==================================== > CommandBars.ActiveMenuBar.Enabled = False 'Turn Access' Menu Bar > OFF !! > > End Sub > > Am I switching off these toolbars correcty and how to get the close > button to be visible again ? > > Regads, > Prakash. Sorry - forgot to mention ... using Access 2003.
From: Prakash on 14 Apr 2010 04:12
On Apr 14, 11:47 am, Prakash <prakashwadhw...(a)gmail.com> wrote: > On Apr 14, 11:40 am, Prakash <prakashwadhw...(a)gmail.com> wrote: > > > > > > > From a form I'm invoking a report. The report opens in preview mode. > > However, I'd like the user to be able to click the "close" button on > > the toolbar to shut the report preview ad go back to the form. The > > access toolbars and menus are switched off by me at the start of the > > application in my form_load event as follows: > > > Private Sub Form_Load() > > 'Call RestoreMissingToolbars > > > 'DoCmd.ShowToolbar "Menu Bar", acToolbarYes > > CurrentDb.Properties("StartupShowDBWindow") = False > > '==== Hide the database window ====== > > 'DoCmd.SelectObject acTable, , True > > 'DoCmd.RunCommand acCmdWindowHide > > '==================================== > > CommandBars.ActiveMenuBar.Enabled = False 'Turn Access' Menu Bar > > OFF !! > > > End Sub > > > Am I switching off these toolbars correcty and how to get the close > > button to be visible again ? > > > Regads, > > Prakash. > > Sorry - forgot to mention ... using Access 2003. Ok! Managedto figure it out !! The foll thread helped me: http://groups.google.com/group/comp.databases.ms-access/browse_thread/thread/e722874c97f68243/4e466cd207fcbc04?lnk=gst&q=custom+toolbar#4e466cd207fcbc04 Just one question: Is my modus operandi in my form_load module correct for hiding the menubar & toolbars or is there a better method ? Rgds, Prakash. |