Startup Menu code

CadMonkey

Misplaced But Useful
Local time
Today, 00:01
Joined
May 19, 2004
Messages
47
Hi all!

I'm wandering if anyone could provide a solution to this problem??

I'm trying to use VBA to create a menu so when you start up an .mdb database it loads a global, custom menu. The custom menu only has three items on it each of which will refer to a function in a module.

I've tried all sorts but always pull up short with an error message or something. Any help would be so appreciated! :D

Many thanks,

Simon C
 
as far as i know you can't run code using variables, ie call "mysub" will not run mysub. A quick fiddle seems to show that you can't use: Module1("mysub") either.

Based on that you can not create truly dynamic, changing code.
So you can either use a select case statement that basically translates the string to a runable command.

Another option is that your code is all in forms, as they can be called dynamically via the forms("formname") referencing.
 
I think I may have phrased the question wrong then?

I'm just after a way of loading up a menu when a database starts then unloading it when it finishes so that this menu doesn't take up permanent residence in the Access Application itself.

Can anyone help me load a menu in VB? I'm having problems using:

docmd.addmenu "blah","blah","blah"

Many Thanks and Much Gratitude
 
I dislike macros but try creating a macro that will build your menu and then convert it to VBA.
 
Thnkyou although I am having some problems creating a menu using macros- I've tried following the help files, but I always end up with wierd results?
 

Users who are viewing this thread

Back
Top Bottom