Trouble with adding fields from a form to an email.

  • Thread starter Thread starter ksaep04
  • Start date Start date
K

ksaep04

Guest
I have searched this site and found a lot of information that pertains to this topic but I try and try and try and i cant get this to work.

This is the problem. I have this form that users fill out in Access 2K and once they are done i want them to be able to send an email notification (we use outlook) to a foreman that new parts are ready. But for the life of me i cant get the body to include fields on the form that the user inputed (i hope thats a word).

I am using this code:

Private Sub Command95_Click()

Dim strBody As String, strSubject As String
srtSubject = "New NDT Request Added"
strBody = "A new request had been added by [employee]. The [jobid] job is a [partdescription] needed on [needdate]."

DoCmd.SendObject , , , "amanda.pena@ge.com", , , srtSubject, strBody
End Sub


Where employee, jobid, partdescription, and needdate are all fields on a form called frmndt.

Any help would be great.
 
Code:
Private Sub Command95_Click()

Dim strBody As String, strSubject As String
srtSubject = "New NDT Request Added"
strBody = "A new request had been added by " & Me!Employee & ". The " & Me!JobID & " job is a " & Me!partdescription & " needed on " & Me!needdate & "."

DoCmd.SendObject , , , "amanda.pena@ge.com", , , srtSubject, strBody
End Sub
 
Ok i figured that out but is there a character limit that can be in the body of an email. for example in my code if i type:

strBody = "A new request has been " & Me!jobid
it works just fine but if i type

strBody = "A new request has been made by " & Me!jobid

it doesn twork. any ideas
 

Users who are viewing this thread

Back
Top Bottom