Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Runtine and shortcut menu

Discussion in 'Information Technology' started by Peter..., Oct 29, 2005.

  1. Peter...

    Peter...
    Expand Collapse
    Guest

    In full Access, when I right-click on a hyperlink field in a form, I get the
    shortcut menu that includes "Edit hyperlink..." (which is what I want to do,
    so that's OK).

    What isn't OK is when an MDE is created and the application run under Access
    Runtime, right clicking on the same field in the same form does not produce
    the shortcut menu.

    Maybe I'm missing something that is blindingly obvious, but I can't see it....

    So, how to I get the shortcut menu with "Edit Hyperlink..."?

    Any help much appreciated.

    Peter
     
  2. George Nicholson

    George Nicholson
    Expand Collapse
    Guest

    By design, "Built-in" menus (including shortcut menus) aren't available in
    Runtime. Any menus that a Runtime user needs to have must be supplied by the
    application developer.

    This may be as simple as copying the items in the built-in shortcut menu to
    a new menu and calling it "Custom Shortcut" and then specifying Custom
    Shortcut as the application's default shortcut menu. (and then recreate the
    mde...).

    I find that "Custom MenuBar", "Custom Print Preview" and "Custom Shortcut"
    are the bare minimums for Runtime usage. Your mileage may vary.

    HTH,
    --
    George Nicholson

    Remove 'Junk' from return address.


    "Peter..." <Peter...@discussions.microsoft.com> wrote in message
    news:31B06277-F32B-4900-857B-D5E0513789AE@microsoft.com...
    > In full Access, when I right-click on a hyperlink field in a form, I get
    > the
    > shortcut menu that includes "Edit hyperlink..." (which is what I want to
    > do,
    > so that's OK).
    >
    > What isn't OK is when an MDE is created and the application run under
    > Access
    > Runtime, right clicking on the same field in the same form does not
    > produce
    > the shortcut menu.
    >
    > Maybe I'm missing something that is blindingly obvious, but I can't see
    > it....
    >
    > So, how to I get the shortcut menu with "Edit Hyperlink..."?
    >
    > Any help much appreciated.
    >
    > Peter
     
  3. Peter...

    Peter...
    Expand Collapse
    Guest

    George, many thanks for the quick response.

    I'll try what you suggest. However, I'm surprised at the answer since in my
    runtime MDE I already have a good set of menus, such as file (with print
    preview), edit, records, help, etc. The surprise comes from Microsoft being
    good enough to carry forward these menus into an MDE without ANY action being
    taken and then not doing anything with the shortcut menu.

    I'll report back.

    Peter

    "George Nicholson" wrote:

    > By design, "Built-in" menus (including shortcut menus) aren't available in
    > Runtime. Any menus that a Runtime user needs to have must be supplied by the
    > application developer.
    >
    > This may be as simple as copying the items in the built-in shortcut menu to
    > a new menu and calling it "Custom Shortcut" and then specifying Custom
    > Shortcut as the application's default shortcut menu. (and then recreate the
    > mde...).
    >
    > I find that "Custom MenuBar", "Custom Print Preview" and "Custom Shortcut"
    > are the bare minimums for Runtime usage. Your mileage may vary.
    >
    > HTH,
    > --
    > George Nicholson
    >
    > Remove 'Junk' from return address.
    >
    >
    > "Peter..." <Peter...@discussions.microsoft.com> wrote in message
    > news:31B06277-F32B-4900-857B-D5E0513789AE@microsoft.com...
    > > In full Access, when I right-click on a hyperlink field in a form, I get
    > > the
    > > shortcut menu that includes "Edit hyperlink..." (which is what I want to
    > > do,
    > > so that's OK).
    > >
    > > What isn't OK is when an MDE is created and the application run under
    > > Access
    > > Runtime, right clicking on the same field in the same form does not
    > > produce
    > > the shortcut menu.
    > >
    > > Maybe I'm missing something that is blindingly obvious, but I can't see
    > > it....
    > >
    > > So, how to I get the shortcut menu with "Edit Hyperlink..."?
    > >
    > > Any help much appreciated.
    > >
    > > Peter

    >
    >
    >
     
  4. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    Hi, Peter.

    The built-in menus aren't available in the Runtime version of Access, so
    you'll need to create your own shortcut menu. First, copy the following code
    and paste it into a standard module:

    Public Function EditHypLink() As Boolean

    On Error GoTo ErrHandler

    RunCommand acCmdEditHyperlink ' Call the "Insert/Edit
    '
    Hyperlink" dialog window.
    Exit Function

    ErrHandler:

    MsgBox "Error in EditHypLink( )." & vbCrLf & vbCrLf & _
    "Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
    Err.Clear

    End Function ' EditHypLink( )

    Save and compile the code. Next, create a custom shortcut menu. If you
    need help, then please see the following Web pages:

    http://msdn.microsoft.com/library/d...reateCustomShortcutMenuForCurrentDatabase.asp

    http://msdn.microsoft.com/library/d.../en-us/off2000/html/ofhowAddCommandToMenu.asp

    While designing your custom shortcut menu, add a custom button to this
    shortcut menu. Right-click on this button and select Properties from the
    pop-up menu to open the Properties <MyMenu> Control Properties dialog window.
    In the On Action Property, type the following:

    =EditHypLink()

    (No spaces.) Close the dialog window when finished making any other changes
    and then close the Customize dialog window.

    Open the form with the Hyperlinks you want the users to be able to edit in
    Design View and then open the Properties dialog window. Select the Form
    Properties and then select the "Other" tab. Select the Shortcut Menu
    Property and assign Yes to this property. Select the Shortcut Menu Bar
    Property combo box and select the name of your custom shortcut bar. Close
    the Properties dialog window and save the form.

    The Runtime version users will be able to use this shortcut menu, and also
    use the Edit Hyperlink dialog window whenever they right-click on a Hyperlink
    control.

    HTH.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips.

    (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    be forwarded to me.)
    - - -
    If my answer has helped you, please sign in and answer yes to the question
    "Did this post answer your question?" at the bottom of the message, which
    adds your question and the answers to the database of answers. Remember that
    questions answered the quickest are often from those who have a history of
    rewarding the contributors who have taken the time to answer questions
    correctly.


    "Peter..." wrote:

    > In full Access, when I right-click on a hyperlink field in a form, I get the
    > shortcut menu that includes "Edit hyperlink..." (which is what I want to do,
    > so that's OK).
    >
    > What isn't OK is when an MDE is created and the application run under Access
    > Runtime, right clicking on the same field in the same form does not produce
    > the shortcut menu.
    >
    > Maybe I'm missing something that is blindingly obvious, but I can't see it....
    >
    > So, how to I get the shortcut menu with "Edit Hyperlink..."?
    >
    > Any help much appreciated.
    >
    > Peter
     
  5. Rick Brandt

    Rick Brandt
    Expand Collapse
    Guest

    Peter... wrote:
    > In full Access, when I right-click on a hyperlink field in a form, I
    > get the shortcut menu that includes "Edit hyperlink..." (which is
    > what I want to do, so that's OK).
    >
    > What isn't OK is when an MDE is created and the application run under
    > Access Runtime, right clicking on the same field in the same form
    > does not produce the shortcut menu.
    >
    > Maybe I'm missing something that is blindingly obvious, but I can't
    > see it....
    >
    > So, how to I get the shortcut menu with "Edit Hyperlink..."?
    >
    > Any help much appreciated.
    >
    > Peter


    In the Runtime environment ALL the built in shortcut (right-click) menus are
    unavailable. You can create your own shortcut menu though and use that.

    --
    I don't check the Email account attached
    to this message. Send instead to...
    RBrandt at Hunter dot com
     
  6. George Nicholson

    George Nicholson
    Expand Collapse
    Guest

    Not to be picky, but there's really no such thing as a "Runtime MDE". A file
    isn't runtime or not. It is how the file is run on a particular machine that
    determines the app's current Runtime vs Retail status. The same file will
    behave differently in the two.

    When running your app either a) on a machine with only a Access Runtime
    license, not Retail, installed or b) a machine with Retail Access but the
    app was opened with the Runtime command line switch:

    Do you still see any built-in menus? Do you see any menus when a report is
    in Print Preview? You shouldn't be seeing any menus that you haven't
    specifically created. If you do, it's a mistake. A mistake that might get
    fixed the next time a user visits Office Update....

    The following might be useful:
    http://msdn.microsoft.com/library/d.../odecore/html/dehowtargetingaccessruntime.asp
    (especially the following sections:)
    Simulating the Microsoft Access Run-Time Environment
    Differences Between Full Microsoft Access and the Run-Time Environment

    HTH,
    --
    George Nicholson

    Remove 'Junk' from return address.


    "Peter..." <Peter@discussions.microsoft.com> wrote in message
    news:7AD89BC6-7D87-4DD9-B039-B6C34469D25D@microsoft.com...
    > George, many thanks for the quick response.
    >
    > I'll try what you suggest. However, I'm surprised at the answer since in
    > my
    > runtime MDE I already have a good set of menus, such as file (with print
    > preview), edit, records, help, etc. The surprise comes from Microsoft
    > being
    > good enough to carry forward these menus into an MDE without ANY action
    > being
    > taken and then not doing anything with the shortcut menu.
    >
    > I'll report back.
    >
    > Peter
    >
    > "George Nicholson" wrote:
    >
    >> By design, "Built-in" menus (including shortcut menus) aren't available
    >> in
    >> Runtime. Any menus that a Runtime user needs to have must be supplied by
    >> the
    >> application developer.
    >>
    >> This may be as simple as copying the items in the built-in shortcut menu
    >> to
    >> a new menu and calling it "Custom Shortcut" and then specifying Custom
    >> Shortcut as the application's default shortcut menu. (and then recreate
    >> the
    >> mde...).
    >>
    >> I find that "Custom MenuBar", "Custom Print Preview" and "Custom
    >> Shortcut"
    >> are the bare minimums for Runtime usage. Your mileage may vary.
    >>
    >> HTH,
    >> --
    >> George Nicholson
    >>
    >> Remove 'Junk' from return address.
    >>
    >>
    >> "Peter..." <Peter...@discussions.microsoft.com> wrote in message
    >> news:31B06277-F32B-4900-857B-D5E0513789AE@microsoft.com...
    >> > In full Access, when I right-click on a hyperlink field in a form, I
    >> > get
    >> > the
    >> > shortcut menu that includes "Edit hyperlink..." (which is what I want
    >> > to
    >> > do,
    >> > so that's OK).
    >> >
    >> > What isn't OK is when an MDE is created and the application run under
    >> > Access
    >> > Runtime, right clicking on the same field in the same form does not
    >> > produce
    >> > the shortcut menu.
    >> >
    >> > Maybe I'm missing something that is blindingly obvious, but I can't see
    >> > it....
    >> >
    >> > So, how to I get the shortcut menu with "Edit Hyperlink..."?
    >> >
    >> > Any help much appreciated.
    >> >
    >> > Peter

    >>
    >>
    >>
     
  7. Peter...

    Peter...
    Expand Collapse
    Guest

    Many thanks to Rick, George and Gunny('69. Camero)

    I have now got my required edit hyperlink appearing in the shortcut menu
    when running as an MDE under Access Runtime. I created it with just one entry
    - the standard "Hyperlink..." command.

    Gunny: I didn't have to use your Function EditHypLInk(). Even though the
    shortcut menu has just the one entry "Hyperlink..." when clicked it opens the
    Edit Hyperlink window which is exactly as required. I read you suggested code
    as giving me just that, whereas I seem to have it anyway without the code.
    Have I interpreted your code correctly?

    Peter
     
  8. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    Hi, Peter.

    > Edit Hyperlink window which is exactly as required. I read you suggested
    > code
    > as giving me just that, whereas I seem to have it anyway without the code.
    > Have I interpreted your code correctly?


    Yes. I took an example from an old database of mine that's intended for the
    Runtime version of Access, where the edit Hyperlink function needed to be
    available from multiple objects, so all of them called the public
    EditHypLink( ) function. This scenario doesn't quite fit your present
    needs, but if you ever need to expand the functionality of your application,
    then you'll be busy either duplicating your work, or you'll be hunting for
    the syntax somewhere to select an item on a pop-up menu and then execute its
    action.

    Initial development of a software application is generally about 10% of its
    cost. The long-term maintenance of that application is the bulk of the
    expense over the lifetime of the application, so any steps that can be taken
    during initial development to cut down on future maintenance will cut down
    on total cost.

    I was just offering you an opportunity to save time on a task in the future
    which, admittedly, may never come to pass. You aren't required to take the
    advice you receive. Just grab whatever advice or snippets of code that you
    deem to be useful. Someone else may yet find a use for the rest. ;-)

    HTH.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips.


    "Peter..." <Peter@discussions.microsoft.com> wrote in message
    news:9B568668-3EB9-4CC0-B013-B4C01397469F@microsoft.com...
    > Many thanks to Rick, George and Gunny('69. Camero)
    >
    > I have now got my required edit hyperlink appearing in the shortcut menu
    > when running as an MDE under Access Runtime. I created it with just one
    > entry
    > - the standard "Hyperlink..." command.
    >
    > Gunny: I didn't have to use your Function EditHypLInk(). Even though the
    > shortcut menu has just the one entry "Hyperlink..." when clicked it opens
    > the
    > Edit Hyperlink window which is exactly as required. I read you suggested
    > code
    > as giving me just that, whereas I seem to have it anyway without the code.
    > Have I interpreted your code correctly?
    >
    > Peter
    >
     
  9. Peter...

    Peter...
    Expand Collapse
    Guest

    Hi Gunny, thank you for clarification on the code snippet. Your answers have
    given me the solution I was loking for, so many thanks

    Peter
     
  10. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    You're very welcome.

    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips.


    "Peter..." <Peter@discussions.microsoft.com> wrote in message
    news:C4FE9208-AF32-4C3E-A641-B44F56E85286@microsoft.com...
    > Hi Gunny, thank you for clarification on the code snippet. Your answers
    > have
    > given me the solution I was loking for, so many thanks
    >
    > Peter
     
  11. George Nicholson

    George Nicholson
    Expand Collapse
    Guest

    >>You aren't required to take the advice you receive.

    <g> reminds me of the words of a famous philospher:

    "Any advice that you can understand can't possibly be of any use."
    - Lucy Van Pelt (Peanuts)

    --
    George Nicholson

    Remove 'Junk' from return address.


    "'69 Camaro" <ForwardZERO_SPAM.To.69Camaro@Spameater.orgZERO_SPAM> wrote in
    message news:uS%236p5A3FHA.4048@TK2MSFTNGP10.phx.gbl...
    > Hi, Peter.
    >
    >> Edit Hyperlink window which is exactly as required. I read you suggested
    >> code
    >> as giving me just that, whereas I seem to have it anyway without the
    >> code.
    >> Have I interpreted your code correctly?

    >
    > Yes. I took an example from an old database of mine that's intended for
    > the Runtime version of Access, where the edit Hyperlink function needed to
    > be available from multiple objects, so all of them called the public
    > EditHypLink( ) function. This scenario doesn't quite fit your present
    > needs, but if you ever need to expand the functionality of your
    > application, then you'll be busy either duplicating your work, or you'll
    > be hunting for the syntax somewhere to select an item on a pop-up menu and
    > then execute its action.
    >
    > Initial development of a software application is generally about 10% of
    > its cost. The long-term maintenance of that application is the bulk of
    > the expense over the lifetime of the application, so any steps that can be
    > taken during initial development to cut down on future maintenance will
    > cut down on total cost.
    >
    > I was just offering you an opportunity to save time on a task in the
    > future which, admittedly, may never come to pass. You aren't required to
    > take the advice you receive. Just grab whatever advice or snippets of
    > code that you deem to be useful. Someone else may yet find a use for the
    > rest. ;-)
    >
    > HTH.
    > Gunny
    >
    > See http://www.QBuilt.com for all your database needs.
    > See http://www.Access.QBuilt.com for Microsoft Access tips.
    >
    >
    > "Peter..." <Peter@discussions.microsoft.com> wrote in message
    > news:9B568668-3EB9-4CC0-B013-B4C01397469F@microsoft.com...
    >> Many thanks to Rick, George and Gunny('69. Camero)
    >>
    >> I have now got my required edit hyperlink appearing in the shortcut menu
    >> when running as an MDE under Access Runtime. I created it with just one
    >> entry
    >> - the standard "Hyperlink..." command.
    >>
    >> Gunny: I didn't have to use your Function EditHypLInk(). Even though the
    >> shortcut menu has just the one entry "Hyperlink..." when clicked it opens
    >> the
    >> Edit Hyperlink window which is exactly as required. I read you suggested
    >> code
    >> as giving me just that, whereas I seem to have it anyway without the
    >> code.
    >> Have I interpreted your code correctly?
    >>
    >> Peter
    >>

    >
    >
     

Share This Page