Results 1 to 3 of 3
  1. #1
    cm-net is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2010
    Posts
    7

    Running Module with Macro

    I am trying to run code with a macro. I have the code set as a function, then I'm trying to call the function in the macro. Here's my module code:



    Private Function RunEmailBlast() As String

    Dim strResults As String

    DoCmd.Hourglass True

    strResults = TotalAccessEmailer(1, False, "Form", "Total Access Emailer", True, True, "usysTEmailerSettings", "usysTEmailerOptions", "usysTEmailerEmbedded")

    DoCmd.Hourglass False

    RunEmailBlast = strResults
    End Function

    And here's my macro:

    Click image for larger version. 

Name:	2.jpg 
Views:	10 
Size:	6.4 KB 
ID:	32274

    This is not working. When I click the macro, nothing happens. Any ideas what I'm doing wrong?

    Thanks in advance. c

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    probably something to do with your TotalAccessEmailer function, check your documentation or contact FMS who you purchased it from.

    Also functions would normally be public, not private - although if you can select it this may not be relevant. I don't use macros for a number of reasons, including the one you are experiencing - no error reporting and no way to debug.

  3. #3
    cm-net is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2010
    Posts
    7
    The issue was "private" vs "public". working now. Thank you!!

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

Similar Threads

  1. Replies: 8
    Last Post: 06-27-2013, 11:58 AM
  2. Running Code from a Module in a Macro
    By ReadyReckoners in forum Modules
    Replies: 2
    Last Post: 05-08-2013, 04:45 AM
  3. Running a module from a button click
    By adacpt in forum Modules
    Replies: 4
    Last Post: 12-03-2012, 01:09 PM
  4. Running a module
    By KevinMCB in forum Modules
    Replies: 2
    Last Post: 03-09-2011, 02:38 PM
  5. Running module from Macro
    By Harley Guy in forum Modules
    Replies: 6
    Last Post: 10-27-2010, 11:05 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