Results 1 to 6 of 6
  1. #1
    mh.kirkerhealth is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2020
    Posts
    3

    Unhappy Error 2501 "The RunMacro action was canceled." - trying to print mail merge letters.

    I have inherited a very old custom Access 2010 database that a business runs entirely off. They used to sell a 26 products, but have since culled it down to 2 and it's been my job to remove the old products.

    My biggest issues is trying to print the mail merge letters after defining the filters in the Print Letters window. When you try to run it, you get the first error window.

    Click image for larger version. 

Name:	error1.jpg 
Views:	29 
Size:	15.1 KB 
ID:	42352



    Upon clicking 'Stop all Macros', you get the next error.

    Click image for larger version. 

Name:	error2.jpg 
Views:	29 
Size:	9.5 KB 
ID:	42353

    I have uploaded the database here, and it will be deleted automatically after a week.

    The steps to replicate the issue:
    1. Unzip the file to a folder named 'Kirker Health'
    2. Mount the to a V drive by running
      Code:
      C:\Windows\System32\subst.exe v: "where you extracted the folder"
      in the command line - the database has been hard coded to run off an USB drive with the drive letter V:
    3. Run the database
    4. Close the small window and click Print Letters
    5. Choose a filter (for example, VIP Include under the VIP dropdown, Reminders due in 0 days) and click Search Filtered Records
    6. Click Print-All
    7. Choose 'VIP' under Select Letters to Print


    The above 2 errors should appear, one after the other.

    I started troubleshooting it just before Christmas, but COVID-19 happened and it got sidelined until just now.

    I'm honestly at a lost about why the letters aren't printing - according to my boss, it had been a regular issue under the original programmer (who has since retired). I only work one day a week, but will be following this thread with interest.

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    Try adding this link to the query.


    Click image for larger version. 

Name:	LinkID.png 
Views:	30 
Size:	51.0 KB 
ID:	42354

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    No, do not link those two tables in apdClientSearch. Those tables do not have relationship. Idea is to use a Cartesian product query so the single record in Quote will show with every row of query.

    All tables are local with exception of CustomersCallCare and that db was not provided.

    I tried subst.exe command and get errors in db procedure. Apparently virtual directory is not actually created.

    BTW, don't use quote marks around alternate path string.
    https://docs.microsoft.com/en-us/win...commands/subst
    None of my attempts with this command succeeded.
    Maybe there is a permissions issue.

    Sorry, don't have solution other than to not rely on this substitute pathing.

    I saved db to C: drive folder and modified code to reference that location. Code works.

    I would eliminate as much of Word merge as possible and output Access reports instead.

    Strongly recommend converting macros to VBA, one reason being VBA is easier to debug.
    Last edited by June7; 07-07-2020 at 04:16 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    mh.kirkerhealth is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2020
    Posts
    3
    June7 was right; it breaks the mail merge completely and only resumed working once I deleted the link, with the same issues in the OP.

    Quote Originally Posted by davegri View Post
    Try adding this link to the query.


    Click image for larger version. 

Name:	LinkID.png 
Views:	30 
Size:	51.0 KB 
ID:	42354

  5. #5
    mh.kirkerhealth is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2020
    Posts
    3
    CustomersCallCare isn't needed in this case, so it wasn't included in the archive.

    Unfortunately, your suggestions are beyond my scope of Access knowledge & I doubt my boss would be prepared to invest a considerable amount of time or money in having these issues fixed or getting a new CRM system built. He's expecting me to 'put band aids' on the current database to just keep it working.

    Quote Originally Posted by June7 View Post
    No, do not link those two tables in apdClientSearch. Those tables do not have relationship. Idea is to use a Cartesian product query so the single record in Quote will show with every row of query.

    All tables are local with exception of CustomersCallCare and that db was not provided.

    I tried subst.exe command and get errors in db procedure. Apparently virtual directory is not actually created.

    BTW, don't use quote marks around alternate path string.
    https://docs.microsoft.com/en-us/win...commands/subst
    None of my attempts with this command succeeded.
    Maybe there is a permissions issue.

    Sorry, don't have solution other than to not rely on this substitute pathing.

    I saved db to C: drive folder and modified code to reference that location. Code works.

    I would eliminate as much of Word merge as possible and output Access reports instead.

    Strongly recommend converting macros to VBA, one reason being VBA is easier to debug.

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I was going to take a look, but apparently the dB has been deleted. Since you are using a USB drive, you don't have to use the subst command any more than you would if you have an external 2TB drive.

    There is a way to force a specific USB Device to be assigned drive letter. No matter what computer you put the drive into, it would (could) always be drive V: .


    http://www.nirsoft.net/ <- main page
    USBDeview v2.86

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

Similar Threads

  1. Replies: 6
    Last Post: 10-21-2014, 12:25 PM
  2. runtime error 2501 openform action was canceled
    By rumenrs in forum Programming
    Replies: 2
    Last Post: 04-11-2013, 04:29 AM
  3. Replies: 6
    Last Post: 11-28-2012, 03:43 PM
  4. Replies: 15
    Last Post: 07-26-2012, 02:06 PM
  5. Replies: 3
    Last Post: 05-06-2012, 06:29 PM

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