Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email with subform data

Status
Not open for further replies.

rlmorgan

Technical User
Jun 2, 2006
32
US
I a little more need help on this one. I have a form that contains lookup information about computers in for repairs. After I lookup a computer, a subform shows the parts that have been orders for it. I have a command button that will be used to notify the Technician that the part has arrived. I can’t get it to pull the email address from the subform's [PagerEmail] field. Any suggestions?


Private Sub cmdNotifiy_Click()
Dim emBody As String

emBody = ""
emBody = emBody & "Your " & Forms!frmParts!frmPartsSub.Form!![PartShortName] & vbCrLf
emBody = emBody & "for " & Forms!frmParts!ServiceTag & vbCrLf
emBody = emBody & "arrived" & vbCrLf
MsgBox emBody


DoCmd.SendObject acSendNoObject, EMail, , Forms!frmParts!frmPartsSub.Form!![PagerEmail], , , "Parts Arrived", emBody

Forms!frmParts!frmPartsSub.Form!![DateTechEmailed] = Date

End Sub

 
You have two bangs (!), use only one, it may help:

DoCmd.SendObject acSendNoObject, EMail, , Forms!frmParts!frmPartsSub.Form[red]!![/red][PagerEmail], , , "Parts Arrived", emBody
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top