Email

  • Thread starter Thread starter garyglp
  • Start date Start date
G

garyglp

Guest
Is there a way to have a form email the form or a report from an email field on the form?
 
What you need to do is view the code on the form, (create a command button first to allow email). What you need to use is the Send Object command. Below is an example of one that I have used:

DoCmd.SendObject , , , , , , "Response Time: " & Me.[Response By Time], vbCrLf & "CBUK Number: " & Me.CBUK_Numberfld & vbCrLf & vbCrLf & "Contact Name: " & Me.[Contact Name] & vbCrLf & "Contact Number: " & Me.ContactNumberfld & vbCrLf & "Location: " & Me.Location & vbCrLf & "Region: " & Me.Region & vbCrLf & vbCrLf & "FTIP: " & Me.FTIP & vbCrLf & "NCIF: " & Me.NCIF & vbCrLf & "FXOD/FXOS: " & Me.Text58 & vbCrLf & "VCI: " & Me.VCI & vbCrLf & "VPI: " & Me.VPI & vbCrLf & vbCrLf & "Connection Speed; " & Me.Speed & vbCrLf & "Interface: " & Me.Interface & vbCrLf & vbCrLf & "Problem Description: " & Me.[Problem Description] & vbCrLf & vbCrLf & "UserID: " & Me.AddedByUser, False, False

This is a pretty long string, but alot of info needs to be added.

If you need any more info, drop me a mail.

Hope this helps !
 
This code puts the field names in my e-mail but doesn't put the current form data in. Am I missing something? Also every time I press the command button I get an 'Illegal Operation' error and MSAccess shuts down. Can you help me any more with this? Thanks.
 

Users who are viewing this thread

Back
Top Bottom