Results 1 to 5 of 5
  1. #1
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Strategy Question: Access and EMail (Access 2002/SP3)

    Scenario:
    My current DB uses access to send mail to remind participants of various things. Otherwise, its' an obscure DB and they won't be checking it daily. Mostly, the email addresses are picked up from the table of user account information and messages are created in response to buttons. However, there is one guy - let's call him the program co-ordinator that gets mail regularly from a number of different places within the db. For him I wrote a function that picks up his email address and assembles the message from information (message head and message body) provided by other subroutines.
    All of this is working nicely.
    Now, I'm trying to implement an improvement to this system.
    If the user cancels sending the mail message I want at the very least a custom error message telling them why the mail must go through. Ideally, the information they were adding to the db will also be cancelled. (Something along the lines of not allowing people to cancel approvals without TELLING each other that approval has been cancelled). This also is working nicely. For everyone except the program co-ordinator. Since his message is passed to the function and assembled there, any email cancellations are not picked up by the sub that launched the message. Remember messages to him have variable contents. Anyway, I was wondering if the error msg created by cancelling an email could be passed back to a private sub or if there is a better way of handling the scenario.

    Thanks for your thoughts.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,613
    Thanks
    3
    Thanked 58 Times in 58 Posts

    Re: Strategy Question: Access and EMail (Access 2002/SP3)

    Boy you picked a sticky one. There is a way to wrap data entry and changes in a transaction, but all of the additions, changes and deletes must be done in code - which typically means an unbound form. There is also a way to cancel an event which can be used to stop data from being added, edited or deleted, but your function would need to return some sort of parameter to tell the event procedure it needs to be cancelled. Is the email being sent using Automation of Outlook or the basic SendMail command?
    Wendell

  3. #3
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Strategy Question: Access and EMail (Access 2002/SP3)

    I want to be known for the high quality of my questions <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>.
    Mail is being sent via the basic SendMail command as users may be using other mail clients than Outlook.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,613
    Thanks
    3
    Thanked 58 Times in 58 Posts

    Re: Strategy Question: Access and EMail (Access 2002/SP3)

    When using the SendMail command, as far as I know there is no way to detect that a user has cancelled sending the email. It might be possible to detect if you get down to the MAPI level, but I really don't know anything about that. (Sorry for the long delay in responding - I've been on the road since Wednesday.)
    Wendell

  5. #5
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Strategy Question: Access and EMail (Access 2002/SP3)

    No problem, thanks for the help.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •