Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access97/Transfer Menubar

Posted on 1997-12-22
2
Medium Priority
?
265 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 400 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

688 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