Solved

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

Posted on 2007-04-04
3
290 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

773 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