?
Solved

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

Posted on 2007-04-04
3
Medium Priority
?
318 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

801 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