A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to assign a menu bar to a report opened in design mode



 
 
Thread Tools Display Modes
  #1  
Old January 20th, 2005, 12:09 AM
Gordon
external usenet poster
 
Posts: n/a
Default How to assign a menu bar to a report opened in design mode

I am working with a program where I need to control what a user can do when
they open a report in design mode. The plan is to assign a predefined menu
bar to the report when it is opened but I have not been able to figure out
how to do this.

I can assign a menubar to the reports and it works when they are opened in
view mode - this menu bar has a button to enter design mode but once I clidk
on the button and the report goes into design mode, my custom menu bar that
was displayed in the view mode goes away.

Here is the code I use to assign the menu bar to the reports.

Public Sub OpenReport()
Dim rpt2 As Report
Static count As Integer
If count = 0 Then
count = count + 1
DoCmd.OpenForm "OpenReport", , , , , acDialog

If Forms("OpenReport").Tag Str(-1) Then
'open report in preview mode
DoCmd.OpenReport Forms("OpenReport").Tag, acViewPreview

End If

DoCmd.Close acForm, "OpenReport"
'assign menu bar
For Each rpt In Reports
If bCanPrint Then
rpt.MenuBar = "ReportMenu"
Else
rpt.MenuBar = "ReportMenuNoPrint"
End If
rpt.ShortcutMenu = True
Next rpt
Else
count = count - 1
End If
End Sub

How can I assign a menu bar when an open report is put into design mode?

Thanks
Gordon


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exit Design Mode Chris General Discussion 1 November 11th, 2004 01:42 PM
Dynamic Page Margins Vel Setting Up & Running Reports 6 September 19th, 2004 09:46 PM
Save Report With CreateReport Coding Issue Jeff Conrad Setting Up & Running Reports 8 July 12th, 2004 08:39 AM
On Open, Menu sits behind the Report stealth Using Forms 1 June 11th, 2004 02:07 PM


All times are GMT +1. The time now is 07:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.