Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question About sending email with access 2003

    I'm a fairly new user of Access (2003). I have a database that has a form called frmIngressEq,
    this form shows the ID ingress, customer's name,
    customer's email and equipment that entered. when the equipment enters it is assigned a
    status, eg status 1.
    Moreover I have another form called frmStatusEq showing the current
    status in which the equipment is located. is it possible to create a button
    in the form frmStatusEq that Take the email customer's address of the form frmIngresoEq and sends the
    status that has the equipment on the form frmStatusEq and ,finally, after clicking the button
    change the state before. for example from status 1 passes to status 2.
    excuse my english I'm not american
    Thanks in advance

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Emectronic,

    Welcome to the Lounge as a new poster.

    Here is a link to a previous thread on this subject I hope this helps.

    Here is another link with more involved code.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. The Following User Says Thank You to RetiredGeek For This Useful Post:

    emectronic (2012-11-15)

  4. #3
    New Lounger
    Join Date
    Nov 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That was fast
    Thank you! i'm going to read that links
    I hope they'll help me =)

  5. #4
    Star Lounger
    Join Date
    Dec 2009
    Location
    Findlay, Ohio
    Posts
    57
    Thanks
    4
    Thanked 6 Times in 6 Posts

    Give this a shot.

    Give this a shot:
    ---
    Option Compare Database
    Option Explicit
    Private Sub Command0_Click()
    Dim App As Object
    Dim ITM As Object
    Dim attachment As String
    Dim sendto As String
    Dim ccaddress As String
    Dim bccaddress As String
    sendto = "whatever@gmail.com"
    ccaddress = ""
    bccaddress = ""
    Set App = CreateObject("Outlook.Application")
    Set ITM = App.CreateItem(0)
    With ITM
    .subject = "test message" ' or just reference something on the screen. i.e. Me.subject
    .To = sendto
    .CC = ccaddress
    .BCC = ccaddress
    .Body = "this is the body of my message" ' or just reference something on the screen i.e.Me.textmessage
    If Left(Me.attachment, 1) <> "<" Then ' They can type in the attachment from the screen here
    .Attachments.Add (Me.attachment) ' This is the FULL path to the attachment
    End If
    '.attachments.Add ("c:\junk.txt") ' or just hard wire it

    ' use below to display the message before sending
    ' .Display
    ' use below to just send it.
    ' .send
    End With
    Set App = Nothing
    Set ITM = Nothing
    End Sub

Tags for this Thread

Posting Permissions

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