Solved

How to Continue running code or macro after SendObject is denied by user?

Posted on 2007-04-04
3
271 Views
Last Modified: 2013-11-27
Hello all,

Macro generates some tables and then SendObject's them out to users in 2 parts (two different groups of users recving diff tables).  

Basically:
runcoderuncoderuncode
sendobject: tables A&B to users Al & Bob
sendobject: tables A&C to users Cindy & Deb

Is there some way to set this up so that the enduser can reply 'No' to the first sendobject call, and then still have the code continue to move to the 2nd sendobject call?  no matter what i try, whatever code or parent macro has initiated the request gets shut down as soon as user replies "No" to the first sendobject task.

thanks!!
0
Comment
Question by:new_wes
  • 2
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 18851177
You'd have more flexibility to do this if you converted your macro to VBA:

Function SendTheTables()
     On Error Resume Next                '**** the simplest way to handle this
     Docmd.sendObject   .....
     docmd.sendobject  .....
end function
0
 

Author Comment

by:new_wes
ID: 18858538
ha!  perfect.  

thanks!!
0
 
LVL 61

Expert Comment

by:mbizup
ID: 18858593
I'm glad that helped, and hope it helps elsewhere in your applications as well.  Overall, VBA offers you more readable error messages, better error handling, infinitely more flexibility for customized solutions, etc, etc, etc..... than Macros do.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now