Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30
  1. #16
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    I deleted my first post when I realized it wasn't relevant. You were too fast and already read it. In your case the Exit branch isn't really needed but there are situations where it could be. Review http://allenbrowne.com/ser-23a.html
    Allen shows using the Exit branch to make sure objects such as recordsets get cleared even if the procedure errors. This could be really important when opening apps like Excel and Outlook as VBA objects. If the procedure errors and the objects aren't cleared and the apps closed, could be left with disconnected processes running in Windows Task Manager.


    This problem code is behind a subform? The procedure that works without issue in RT is behind a main form?


    Ssanfu, the email can be canceled from the Outlook message that opens. Just close it without clicking Send. That produces the error message that Reugen is trying to handle. The error handler works fine in a regular db but the runtime has an issue.
    Could this all be due to the "end if" after the sendobject?

  2. #17
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    No, it is required to be there.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #18
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    No, it is required to be there.
    before or after the error catcher, exit etc?

    I'm going to see if that makes any different, the placement of the end if - can't test for another hour though

  4. #19
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Before. It is in proper position.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #20
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Ruegen,

    The code you posted looks to be OK. Take a look at the code I tested earlier. It is practically identical. Something else is going on. This is what June is trying to say. Some other code is still up and running when the user chooses to cancel. Try to place your docmd somewhere after you have freed up anything stored in memory within that module. As mentioned, you want to look at both Main form and subform code.

    If all else fails, I guess you could just place an On Error Resume Next just before your docmd. I don't see the need for the user getting a msgbox after they close the Email or click cancel while the PDF is being generated and attached. They are the one clicking to close or cancel.

  6. #21
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I agree the message box is extraneous. The user will see the Email close and don't really need confirmation. It's just another annoying button to click.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #22
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by ItsMe View Post
    Ruegen,

    The code you posted looks to be OK. Take a look at the code I tested earlier. It is practically identical. Something else is going on. This is what June is trying to say. Some other code is still up and running when the user chooses to cancel. Try to place your docmd somewhere after you have freed up anything stored in memory within that module. As mentioned, you want to look at both Main form and subform code.

    If all else fails, I guess you could just place an On Error Resume Next just before your docmd. I don't see the need for the user getting a msgbox after they close the Email or click cancel while the PDF is being generated and attached. They are the one clicking to close or cancel.
    It's strange. The one computer having the issue is running outlook 2010 on windows 8 - it is the only one with the issue, I've run a virtual of vista business using vm virtual box just to run runtime in an environment without having to ask the stuff to check for the error and I don't get the issue - I'm running vista with it's native mail program though so perhaps windows 8 doesn't like it or it is an issue with outlook (although I think it is my code)

    I've removed the message box which didn't improve the issue. I might check for other bits of code but nothing else should be stored in memory.

  8. #23
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    I agree the message box is extraneous. The user will see the Email close and don't really need confirmation. It's just another annoying button to click.
    yah, I do agree with you however the staff are required to double check everything they do - even to know when they have cancelled doing something that is required by them. Sounds ridiculous I know.

  9. #24
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    To confirm it is the one pc that has the issue, all others don't and they are running vista business and the native email client.

    I've asked staff to check.

  10. #25
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The only thing different is Windows 8? Then I suspect some incompatbility issue. I haven't used Windows 8 and really don't look forward to it.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #26
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    The only thing different is Windows 8? Then I suspect some incompatbility issue. I haven't used Windows 8 and really don't look forward to it.
    yah, it's a 64bit install because we have the extra ram, it's running 32bit packages of 2010 office including 32bit 2013 office word and excel so I can imagine why there are compatibility issues...

    I have to run 32bit outlook because MYOB the accounting program isn't compatible with office 64bit.

    I'm tempted to wipe the pc to a clean state and then reinstall everything

  12. #27
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    ehh, I ran outlook 2010 on vista business to compare it to native mail - in the virtual environment. It's not windows 8 but outlook.

  13. #28
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Verify the version of office and match your RT version to that.

    If you end up wiping the drive, install 64 bit W8 and 32 bit Office. If you are going to install RT, use custom install with Office. Install all components except Access. Use the run from disc option.

    At least, that is how I would do it.

  14. #29
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by ItsMe View Post
    Verify the version of office and match your RT version to that.

    If you end up wiping the drive, install 64 bit W8 and 32 bit Office. If you are going to install RT, use custom install with Office. Install all components except Access. Use the run from disc option.

    At least, that is how I would do it.
    It's an issue of Access Runtime 2010 32bit not working with Outlook 2010 32bit. I am attempting to install Access Runtime 2013 32bit to see if that makes a difference.

    I'm considering installing windows 7 on the machine as that has a decent native email client that will work with MYOB (won't work with anything 64bit or windows live mail) just so that the user can have one email client and not have to run two.

  15. #30
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    meh I just installed full office works fine. Better to run full access when working with outlook it seems.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Error on SendObject method - Unknown recipient
    By Glenn_Suggs in forum Access
    Replies: 4
    Last Post: 07-11-2013, 12:11 PM
  2. Outlook error message using SendObject method
    By Juan23 in forum Programming
    Replies: 3
    Last Post: 07-10-2013, 12:03 PM
  3. Replies: 2
    Last Post: 05-05-2012, 02:34 AM
  4. Replies: 0
    Last Post: 03-11-2012, 09:19 AM
  5. Cancel Error
    By Newbie11 in forum Reports
    Replies: 1
    Last Post: 02-13-2012, 09:13 AM

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