Results 1 to 6 of 6
  1. #1
    mosheva is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    8

    Question Help - Create e-mail template with specific form field that are already field

    Hello!
    I have build a form for filling general maintenance issues for my technician to fill when they preforming maintenance to parts in our lab.
    I want to build a button that will send the data via email (body) in a unified formation like:

    Dear <manual fill>,

    Pls find the following description for a suspected problem that occurred in [<lab location from a specific field>] on [<machine from a specific field>] during [date/time from a specific field].
    The following SR ID [< unique number access is generating from a specific field>] is opened in the SR Tool-CRM system. Case severity is [minor/major/critical from a specific field].

    Description: [<from the description field>].

    This case is assigned to [employee name from a specific field].

    Please keep us updated for the progress of investigation.


    Regards,


    XXXXXXX

    Is it possible?

    Regards,
    Moshe.

    BTW
    sorry for my English...

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    I have responded to a number of threads on topic of email. Search forum on keyword 'email' and username 'June7'. Here is one https://www.accessforums.net/showthr...ails-on-update
    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. #3
    mosheva is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    8
    Thank you but it is not what I intend...
    I mange to work it out with this code:

    Code:
    Private Sub email_Click()
    messageText = "Dear ," & vbCrLf & "Please find the following description for a suspected problem that occurred in " + LocationTxt.Value + " on " + RunwayCombo.Value + " SDU # " + SduCombo.Value + " " + "During Date/Time" & vbCrLf & "The following SR ID# <_>" + "is Opened in the SR Tool-CRM system. Case severity is " + SevirityTxt.Value & vbCrLf & "" & vbCrLf & "Description:" & vbCrLf & Description.Value & vbCrLf & " " & vbCrLf & "Additional information:" & vbCrLf & Additional information.Value & vbCrLf & "" & vbCrLf & "Please add resolution below:" & vbCrLf & "" & vbCrLf & "This case is assigned to: " + GsocEmployeeCombo.Value & vbCrLf & "Please keep us updated for the progress of investigation." & vbCrLf & "" & vbCrLf & "Regards," & vbCrLf & GsocEmployeeCombo.Value & vbCrLf & "GSOC" & vbCrLf & "Labs Systems, Ltd" & vbCrLf & "Office: " & vbCrLf & "Fax: " & vbCrLf & "eMail: " & vbCrLf & "web: "
    
    
    
    
    DoCmd.SendObject , , , , , , , messageText, , ""
    End Sub
    I'm looking for an easy way to do it with options like text size, choose bold or underline etc'...

    Plus when I'm trying to add the ticket ID (auto generated by access) I get error 13 type mismatch same goes for date and time.

    Please help me with a simple solution...

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Such formatting requires HTML code tags and apparently SendObject cannot handle.

    Review
    http://www.fmsinc.com/MicrosoftAcces...endObject.html
    http://p2p.wrox.com/excel-vba/60103-...sage-body.html
    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. #5
    mosheva is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    8
    Thank you!
    I didn't figure out how to enter the specific field that I need from the form.
    If I go back to my template I need that the bold will be auto-fill from the ticket (form)

    Please find the following description for a suspected problem that occurred in [<lab location from a specific field>] on [<machine from a specific field>] during [date/time from a specific field].
    The following SR ID [< unique number access is generating from a specific field>] is opened in the SR Tool-CRM system. Case severity is [minor/major/critical from a specific field].

    Description: [<from the description field>].

    This case is assigned to [employee name from a specific field].

    Please keep us updated for the progress of investigation.

    on my code I used + specific field.value option.
    How do I get them in the HTML format?

    Your help is much appreciated!

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Build the email body with HTML code tags.
    Review
    http://us.generation-nt.com/answer/o...-36414902.html
    http://www.w3schools.com/html/html_basic.asp
    http://www.htmlcodetutorial.com/quicklist.html

    Concatenate literal strings and variables. Reference to form control is a variable. Something like:

    strMailMsg = "<HTML><BODY>" & _
    "<FONT FACE='Arial' FONT SIZE='2'>Please find the following description for a suspected problem that occurred in " & Me.textboxname & _
    " on " & Me.textboxname & " during " & Me.textboxname & _
    ".<p>The following SR ID " & Me.textboxname & " is opened in SR Tool-CRM system. Case severity is " & Me. textboxname & _
    ".<p>Description: " & Me.textboxname & _
    ".<p>This case is assigned to: " & Me.textboxname & _
    ".<p>Please keep us updated for the progress of investigation." & _
    "</font></body></html>"
    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.

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

Similar Threads

  1. Replies: 11
    Last Post: 12-04-2010, 10:20 AM
  2. Form Field open Default mail client
    By ducecoop in forum Access
    Replies: 4
    Last Post: 11-18-2010, 11:37 AM
  3. Replies: 0
    Last Post: 07-16-2010, 09:06 AM
  4. Replies: 1
    Last Post: 11-10-2009, 03:20 PM
  5. How to Create Field in Template
    By Jonathan in forum Access
    Replies: 1
    Last Post: 01-30-2009, 02:00 PM

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