Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

shortcut menu or windows menu controls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
iccsi - 29 May 2008 17:50 GMT
I have an application which has many buttons on the form. I would like
to move some action to shortcut menu and Windows menu to make the form
clean.

I tried to use shortcut menu, It ssems it is not stable for 2003
version. I had an applicaiton using version 2000 which works fine for
tghe shortcut menu,

I made a function call to shortcut menu which works, but it fails
after I do a couple of tests.
Some shortcut menu keep longer, but some fails a couple of time tests.
I need delete the shortcut menu and re create it to make it work
again.
I am unable to distribute the application shortcut menu keep failing.

Are there any issue with 2003 shortcut menu?
Are there any Windows menu controls for Access 2003 to move some
action to shortcut menu or Windows menu?

Your information s great appreciated,
iccsi - 29 May 2008 18:14 GMT
> I have an application which has many buttons on the form. I would like
> to move some action to shortcut menu and Windows menu to make the form
[quoted text clipped - 16 lines]
>
> Your information s great appreciated,

It is me again,
I just realized that it is possible that I change the form on the
shortcut menu makes problem.

For example, I have data entry form 1 and shortcut menu 1 to open data
entry form 2 and close data entry form 1.
Does it cause any problem to use shortcut menu?
If yes, are there any work around?

Your help is great appreciated,
Albert D. Kallal - 30 May 2008 03:21 GMT
I have no idea why are having problems with shortcut menus, I've been
distributing applications all over the world using access 2003, and I
haven't had one support call in about what, is it been for years since
access 2003 been out?

I would say that 90% of my custom menu bars call, and run my VBA code.

All you need to do is make the code (a function) public, and then simply
place the function name in the buttons on-action event code.

Further, likely often you will have specific code to a particular form, and
once again, you simply declare those functions (in that form) as public.

The syntax to call the code then is:

=YourFunctionName()

Often, (if not most of the time), you code you call will need to pick up
some information about he current screen etc. So, my code most of the time
starts out, and grabs the current screen name. I use:

Public Function AskInvoicePrint()

  Dim tblgroupid    As Long
  Dim frmActive     As Form

  Set frmActive = Screen.ActiveForm

  tblgroupid = frmActive.frmMainClientB.Form!ID

  If frmActive.InvoiceNumber = 0 Then
     frmActive.InvoiceNumber = nextinvoice
     frmActive.Refresh
  End If

  DoCmd.OpenForm "guiInvoicePrint", , , "id = " & tblgroupid

End Function

The above is code that the invoice print button runs. note how I right away
pick up the active form. After that, I can easily ref the forms object as if
the code was running much like the code would if put behind a button on the
form. In the above example, I also check if a invoice xnumber has been
generated before printing. And, the Refresh forces a disk write if in fact I
do change the invoice number. And, in addition the above clip also passes
the currently selected sub-form item that the invoice print form needs.

Also, if the code you write is for the particular form, then as mentioned,
you can simply place the code into the forms module code. There is no need
to pick up the active screen...and you can use "me." as you always used.

If you want to see some sample menu bars + screen shots, and why I use them,
you can read
the following:

http://www.members.shaw.ca/AlbertKallal/Articles/UseAbility/UserFriendly.htm

Signature

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com

iccsi - 30 May 2008 14:26 GMT
On May 29, 10:21 pm, "Albert D. Kallal"
<PleaseNOOOsPAMmkal...@msn.com> wrote:
> I have no idea why are having problems with shortcut menus, I've been
> distributing applications all over the world using access 2003, and I
[quoted text clipped - 57 lines]
> Edmonton, Alberta Canada
> pleaseNOOSpamKal...@msn.com

Thanks for the information,

I beleive that I found the problem.
Because I change the form on the shortcut menu, the shortcut menu
still shows after the form 2 open. If user click again then it runs
form 1 shortcut menu code on form 2.

Are there any way to make shortcut menu invisible after click on the
shortcut menu?

Your help is great appreciated,
iccsi - 30 May 2008 14:46 GMT
> On May 29, 10:21 pm, "Albert D. Kallal"
>
[quoted text clipped - 74 lines]
>
> - Show quoted text -

I just realized that the style is disabled when I create shortcut
menu.
The shortcut menu always has an arrow beside. It looks like that the
shortcut menu is a group shortcut menu which does not disappear after
user click on the chortcut menu.

Am I on the right track?
If yes, can you please help me to make the shortcut menu disappear
after user click on the shortcut menu?

Your help isd great appreciated,
iccsi - 30 May 2008 15:10 GMT
> > On May 29, 10:21 pm, "Albert D. Kallal"
>
[quoted text clipped - 88 lines]
>
> - Show quoted text -

I think I found the problem. I have to use custom instead of new menu.

Thanks millions for helping,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.