Re: Right click?
From: PC Data*** (nospam_at_nospam.spam)
Date: 02/20/05
- Previous message: Don: "Re: Data Source for a Sub-Report"
- In reply to: Bill: "Re: Right click?"
- Next in thread: Bill: "Re: Right click?"
- Reply: Bill: "Re: Right click?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 20 Feb 2005 21:03:33 GMT
To start, you need to put a function or sub in a standard module for what
you want the menu item to do. Assuming you want to open your report, put
something like the following in a standard module:
Sub MySubToOpenReport()
On Error Resume Next
DoCmd.OpenReport "MyReport", acPreview
End Sub
Now in the OnAction property you need to tell Access that when the menu item
is selected, it needs to run a specific function or sub. In our case, put
the following in the OnAction property:
=MySubToOpenReport()
Note that the equal sign is needed and also the parameter parantheses are
needed. If you omit either, you will get an error message.
--
PC Data***
Your Resource For Help With Access, Excel And Word Applications
resource@pcdata***.com
www.pcdata***.com
"Bill" <stanton@jps.net> wrote in message
news:xY5Sd.1652$MY6.210@newsread1.news.pas.earthlink.net...
> In the property *** of a shortcut menu item what do
> I set the "OnAction" to call a code*** subroutine?
> I've tried "Call subname arg" and just "subname arg",
> but I get diagnostics about not finding a macro or function
> when I click on the shortcut item.
>
> Thanks,
> Bill
>
>
> "Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
> news:37s5mpF5hmpgpU1@individual.net...
> > "Bill" <stanton@jps.net> wrote in message
> > news:W35Sd.1729$873.720@newsread3.news.pas.earthlink.net...
> >> Rick,
> >> How do I get the menu item into the menu to begin with?
> >> For example, I've already selected and inserted cut,
> >> copy and paste into my new shortcut menu, but I don't
> >> see anywhere in the "Command Tab"an option to add a
> >> new user item.
> >
> >
> > Just copy any existing item and then change the OnAction, Icon, and
Text.
> >
> > --
> > I don't check the Email account attached
> > to this message. Send instead to...
> > RBrandt at Hunter dot com
> >
>
>
- Previous message: Don: "Re: Data Source for a Sub-Report"
- In reply to: Bill: "Re: Right click?"
- Next in thread: Bill: "Re: Right click?"
- Reply: Bill: "Re: Right click?"
- Messages sorted by: [ date ] [ thread ]