[AccessD] Shortcut menu

jwcolby jwcolby at colbyconsulting.com
Tue Jun 26 11:31:55 CDT 2007


>Is the menu you're selecting built as a shortcut menu or a regular menu?

It shows up in the shortcut menu property and is intended as a shortcut
menu.  I designed it years ago so the details have long since flown the
coop.

>You either get all shortcut menu capability or none, no in betweens.

That explains that.  Not as useful as it might be.

>Post the code you're using so we can see exactly what's going on.

Here is the literal code:

    SysVarBehaviorEnbl mfrm.ShortcutMenuBar, "PrpRightClickMenu"

But what is happening is that mfrm.ShortCutMenuBar is being assigned a
string with the name of the menu bar

	mfrm.ShortCutMenuBar = "SomeMenuBarName"

SomeMenuBarName is coming directly from the ShortCutMenuBar property of the
form (for testing purposes) where I have selected it from a pair of menubars
in the drop down.  If I just select it manually, it works, else it does not.

Now... I have since discovered that I have no service packs applied so I
know quite well that I need to apply the service packs and then see what
happens.

John W. Colby
Colby Consulting
www.ColbyConsulting.com 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Tuesday, June 26, 2007 11:32 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Shortcut menu

Is the menu you're selecting built as a shortcut menu or a regular menu?
You either get all shortcut menu capability or none, no in betweens.
Post the code you're using so we can see exactly what's going on.

 Charlotte Foust

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Tuesday, June 26, 2007 5:25 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Shortcut menu

I am trying to set the shortcut menu in code.  According to the help file
the property is settable via vba.  I selected a valid menu from the combo in
the property so that I was displaying the name of a valid menu, then cut
that and pasted it into a string constant - now I have a valid menubar name
for that property.  But when I try to do the assignment statement it errors
with "invalid data type".  The data is a string (the right data type) and is
verified as the real name of a real menubar that can be manually assigned to
the property.

Any clues why this is not working?

Furthmore if I turn off the "allow default shortcut menus" in the startup
properties then I can't seem to set the shortcut menu.  Is that just a
confusing name and you are really shutting off ALL shortcut menus?  I
assumed that it would just remove the default shortcut menu but allow you to
continue setting the shortcut menus to custom menus.

What the heck is going on here?

John W. Colby
Colby Consulting
www.ColbyConsulting.com 

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list