Solved

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

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

828 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