Results 1 to 6 of 6
  1. #1
    Carlos Mesa is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2020
    Posts
    3

    Going from 32bit v.2013 to 64bit v.2019

    The following code does not work on a 64bit v.2019. Does generate an email but remains in "Outbox". Also, Access application closes completely.



    Code:
    Private Sub cmdSendMgrEmail_Click()
    On Error GoTo Err_cmdSendMgrEmail_Click
    
    
    
    
        DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    
    
    DoCmd.SendObject _
        , _
        , _
        , _
        strEmpEmail, _
        , _
        , _
        "Requisition Order Approval Request", _
        "Requisition No. " + CStr(Forms![Orders - Managers]!OrderID) + " requires your approval.  Click the link below to access the Approval Screen" & vbCrLf & "\\10.10.10.205\inventory\pfcinventory1.mdb", _
        False
    
    
        DoCmd.GoToRecord , , acNewRec
        DoCmd.Close acForm, "frmEmailMgr", acSaveNo
    
    
    Exit_cmdSendMgrEmail_Click:
        Exit Sub
    
    
    Err_cmdSendMgrEmail_Click:
        MsgBox Err.Description
        Resume Exit_cmdSendMgrEmail_Click
    End Sub

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    not sure if it is relevant, but docmd.domenuitem was deprecated years ago (2007 I believe) - and has hung around for backwards compatibility. It was replaced with RunCommand. It may be the move to 2019 is not generating errors, but not enabling to code to run correctly

    see this link https://docs.microsoft.com/en-us/off...cmd.domenuitem - it says acRecordMenu only works with access 95 and access 2

  3. #3
    Carlos Mesa is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2020
    Posts
    3
    Thanks Ajax. I changed Do.Cmd.DoMenuItem to RunCommand acCmdSaveRecord. It now generates an email but it doesn't leave the "Outbox" in Outlook. I can't even send it when in Outlook.

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    OK well, one possible cause has been eliminated. Is this a problem for one specific employee or everyone. Would be worth know the value of strEmpEmail but otherwise can see nothing wrong with your code

    Suggest check the options in outlook have not be set in a way that prevents auto sending of email

  5. #5
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Have you considered using "Me.Dirty = False" instead of "DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70"?
    Probably won't fix the email not being sent, but it is a lot shorter to type.....

  6. #6
    Carlos Mesa is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2020
    Posts
    3
    Thanks guys for all your mail. I found out why my email was getting stuck in Outlook. Looks like I had to set the Reference to Microsoft Outlook 16.0 Object Library.

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

Similar Threads

  1. MouseHook 32bit to 64 bit conversion
    By Jaik in forum Programming
    Replies: 2
    Last Post: 01-09-2017, 10:47 AM
  2. Running VBA code as 32bit in acces 2013 x64
    By vinaximus in forum Programming
    Replies: 4
    Last Post: 09-01-2015, 04:22 PM
  3. 32bit 64bit / vba vba7 (which am I running?)
    By markjkubicki in forum Programming
    Replies: 1
    Last Post: 04-08-2014, 10:50 PM
  4. Replies: 3
    Last Post: 05-03-2013, 12:57 AM
  5. Connect 64bit To 32bit Through ODBC, SQL Server 2008
    By 54.69.6d.20 in forum SQL Server
    Replies: 6
    Last Post: 10-08-2012, 06:14 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