Results 1 to 2 of 2
  1. #1
    dssrun is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    83

    Application.Caller for Access


    I have tried searching for this answer but have come up short. I have 2 macros and its actions are the same: RunCode MyFunction. MyFunction runs daily (Macro1) and at the end of the month(Macro2) and each report outputs differently based on the macro(Macro 1 goes to PDF and Macro 2 goes to Excel). Is there a way in MyFunction to find out which macro is running so I can decide how to format the report?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Not sure but you should be able to add a parameter to the function:

    Public Function Functionname(Whatever as String)...

    and call it from each macro:

    FunctionName("daily")
    FunctionName("Monthly")

    The function would test that parameter and respond accordingly.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Caller ID
    By amerr in forum Access
    Replies: 5
    Last Post: 07-11-2011, 02:50 AM
  2. Access Application
    By DSTR3 in forum Access
    Replies: 5
    Last Post: 11-16-2010, 09:11 AM
  3. Replies: 3
    Last Post: 07-15-2010, 06:26 PM
  4. Replies: 0
    Last Post: 08-26-2008, 09:22 AM
  5. Access application to Web based application
    By admaldo in forum Access
    Replies: 0
    Last Post: 06-12-2008, 06:22 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