Results 1 to 2 of 2
  1. #1
    Hello World is offline Novice
    Windows XP Access 2002
    Join Date
    Sep 2011
    Posts
    13

    Table NOT TO update if SendObject cancelled

    Hi all,



    Need help with this one big time if that’s ok.

    I have a form (Form1). This form will be used by HR/Personal staff to enter in how employees have responded to a particular question. Once the employee has been located on the form a combo box (Answer) is used to enter in how the employee has answered. If the employee has said anything but ‘Yes’ then an email is fired off using SendObject to their manager. The user of the form gets a chance to preview the email before pressing ‘Send’. And this is where my problem is.

    If the user of the form cancels the email at the point of previewing it then they are returned to the form whereupon the form refreshes itself so it is blank and ready for the next employee (this is all good and what I want). However, the employee’s answer has already been put into the table connected to the form (Table1). What I need to know is how do I ‘remove’ the answer from the table so that in effect if the email is cancelled/not sent then their answer is removed from the table?

    Thanks in advance!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    IIRC, closing the email without sending throws a 2501 error, which can be trapped. If you're getting that error when you close the email, you could use an error trap to either stop the save or delete the record if already saved.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. OpenReport cancelled
    By wharting in forum Reports
    Replies: 15
    Last Post: 11-11-2011, 02:34 PM
  2. Replies: 1
    Last Post: 01-22-2011, 12:23 PM
  3. Replies: 0
    Last Post: 11-30-2010, 12:23 PM
  4. Update field in table after update on a subform
    By jpkeller55 in forum Queries
    Replies: 3
    Last Post: 09-30-2010, 08:02 PM
  5. Replies: 2
    Last Post: 11-02-2009, 10:14 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