Results 1 to 3 of 3
  1. #1
    AccessOAP is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    3

    Problem creating hyperlink to a sub macro

    I have a series of forms arranged as pop-up 'Help' forms which can be called from different parts of my application. Each Help form has a hyperlink (text 'Close') linked to a macro containing a close form action . (I think this looks nicer than a normal button)This works if I have a separate macro for each form e.g. frmHelp1 has a Close hyperlink which runs mcrCloseHelp1, frmHelp2 has a Close hyperlink which runs mcrCloseHelp2 etc.

    Now I wish to tidy this up by putting all the the close form actions in one macro with sub macros, i.e. mcrCloseHelp.CloseHelp1[CloseHelp2][CloseHelp3] etc. But the hyperlink does not seem to recognize submacros.

    So the hyperlink will work like this:
    Hyperlink Address: Macro mcrCloseHelp1
    but not like this:
    Hyperlink Address: Macro mcrCloseHelp.CloseHelp1

    It errors first with a security warning, then an error message:



    'Unable to open Macro mcrCloseHelp.CloseHelp1. Cannot open the file.'

    Can anyone help or should I just save myself the effort and put a Close button on the form?

  2. #2
    AccessOAP is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    3
    Correction:
    The property sheet should read:
    Hyperlink SubAddress: mcrCloseHelp.CloseHelp1
    There is no security warning in this case just an information message:
    ...Database cannot follow the hyperlink to 'MacroCloseHelp.CloseHelp1.'
    Still doesn't work though!

  3. #3
    AccessOAP is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    3
    Solved:
    Amended macro action to 'Close' leaving the ObjectType and ObjectName parameters blank and deleted all the sub-macros.
    changed the form's Popup property from Yes to No
    Made the Hyperlink SubAddress property link to the new Close macro which now has no sub-macros.
    Found this article helpful:
    http://msaccesstips.com/2007/05/closing-forms/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 12
    Last Post: 12-14-2011, 08:04 PM
  2. active X macro problem
    By stryder09 in forum Access
    Replies: 4
    Last Post: 02-28-2011, 12:13 PM
  3. Creating Macro from Module
    By Harley Guy in forum Modules
    Replies: 1
    Last Post: 11-08-2010, 07:44 AM
  4. Macro problem
    By HelenP in forum Forms
    Replies: 3
    Last Post: 10-29-2010, 06:24 AM
  5. Hyperlink problem
    By peterl in forum Programming
    Replies: 0
    Last Post: 01-13-2009, 07:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums