Consulting

Results 1 to 2 of 2

Thread: Can a checkbox located on a form in Access open a new email when selected?

  1. #1

    Can a checkbox located on a form in Access open a new email when selected?

    Hello,

    Does anyone know if it is possible to have a new email window open when a checkbox is selected?

    Thanks,
    Joe

  2. #2
    VBAX Regular
    Joined
    Jun 2009
    Location
    Dorset
    Posts
    60
    Location
    Yes, just add some VBA to the AfterUpdate event. Something like this:

    Dim oApp As Object, oMessage As MailItem, oRec As Recipient
    Set oApp = CreateObject("Outlook.Application")
    Set oMessage = oApp.CreateItem(olMailItem)
    oMessage.Display ‘comment out if you need to send straight to outbox
    oMessage.Recipients.Add(“EMAIL ADDRESS HERE”).Type = olTo  
    oMessage.Subject = “SUBJECT TEXT HERE”
    oMessage.Body = “BODY TEXT HERE”
    ‘oMessage.Send ‘uncomment this line if you want to send straight to the outbox
     Set oApp = Nothing
    Regards
    JD
    ------------------------------------
    Software-Matters
    Dorset

Posting Permissions

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