Solved

Access97/Transfer Menubar

Posted on 1997-12-22
2
261 Views
Last Modified: 2008-03-06
I am working in Access 97 and I have created a function that will query records based on user input and then create a new database.  I then export the new querydef and data as a table to the new database using the TransferDatabase method.  I am also exporting a report to the new database.  This report uses a custom menubar.  My problem is this; when I export the report, the menubar does not go with it.  Is there a way to transfer a menubar that is not a macro?  I know it can be done from an open database using the 'Get External Data' selection from the file menu.  But I need to export not import.  Any suggestions?
0
Comment
Question by:STKeith
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
mikeeec earned 100 total points
ID: 1963457
I do not know of any way to directly export a custom menubar.  I think the best solution would be to use the CommandBars.Add method, along with the necessary code to completely recreate your menubar in the new database.  This should be fairly straightforward, because you can simply copy the appropriate commands and code from the menubar you have already created.  The initial code would be written as follows:

Set MyNewMenu = CommandBars.Add(Name:="MyMenu", Position:=msoBarRight, MenuBar:=True)
With MyNewMenu
     .Protection = msoBarNoMove
     .Visible = True
End With
 Then, simply use the Add method to add your custom controls to the newly created menubar.
0
 

Author Comment

by:STKeith
ID: 1963458
Thanks mikeeec.  This sounds like it will do the trick.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question