I am looking to build a menu system that will list all my databases and allow me to click to open whichever I choose. Can someone point me in the right direction?
I am looking to build a menu system that will list all my databases and allow me to click to open whichever I choose. Can someone point me in the right direction?
Although that's possible, I wouldn't advise that you try to do that, for several reasons. First, you must realize that Access can only have one database open at a time, so as soon as you chose a database, the application which the menu is in would be closed, so you couldn't return to it; then, how would you find "all" your databases? You could put them all in one directory, I suppose, but that's generally not a good way to organize your hard drive.
I would suggest that you focus on either using Windows Explorer or possibly a Windows Scripting Host (WSH) script that presents a menu of all files with ".mdb" extension. I would not attempt to do it from within Access.
question = 2B || !2B
That's not exactly true. At least, in Access 2007, I can have more than one database open at the same time.
Yes, I was going to say the same thing. What is true is that any one INSTANCE of Access can only have one database open at any one time but you can open another instance of Access to do it.
Sample code for you to open from a combo box if the bound field is the full path and name of the database:
code for the combo box's after update event:Code:Function OpenNewDatabase(strDatabase As String) Dim appAcc As Access.Application Set appAcc = New Access.Application appAcc.Visible = True appAcc.OpenCurrentDatabase (strDatabase) appAcc.UserControl = True End Function
Code:OpenNewDatabase Me.ComboBoxNameHere
Bob Larson
Access MVP (2008-2009, 2009-2010, 2011-2012)
Free samples and tutorials: http://www.btabdevelopment.com
I have it opening the database, but it opens in a half-window. Is there a command to make it open fully?
Any ideas on this one? I like this way of doing it, but it opens the database in a half-window.
try this link
Join our Folding team: DeveloperBarn Folding
-----------------------------------
• Folding Stats - Stanford University
• Folding Stats - Extreme Over-Clocking
• Folding Stats - Kakao Stats
• Folding Stats - Xtreme CPU
-----------------------------------
I can't access that link from work. Any other ideas?
Hope this helps!Originally Posted by http://hubpages.com/hub/MS_Access_Tips_Maximize_MS_Access_Window
Join our Folding team: DeveloperBarn Folding
-----------------------------------
• Folding Stats - Stanford University
• Folding Stats - Extreme Over-Clocking
• Folding Stats - Kakao Stats
• Folding Stats - Xtreme CPU
-----------------------------------
Bookmarks