S
scubadiver
I posted a message yesterday about help with code for creating an email but
maybe I am posting this too soon.
At the moment I have the following:
Private Sub Tracksht_Click()
Dim strToWhom As String
Dim strMsgBody As String
Dim strSubject As String
strSubject = QueryID & " - " & Fin_InvNo & " - " & Qry_QryType & "Query"
strToWhom = ""
strMsgBody = Qry_PropAddress1 & vbNewLine & Qry_Description
DoCmd.SendObject , , , strToWhom, , , strSubject, strMsgBody, True
End Sub
I have two questions:
1) How do I compile text and fields into a string (as I have tried to do in
the "strSubject" above but doesn't seem to work). Is there something I am
missing?
2) The code above is in a button on the sub form. Some of the fields I
require are from the main form. I have tried the usual referencing but
doesn't work.
Cheers
maybe I am posting this too soon.
At the moment I have the following:
Private Sub Tracksht_Click()
Dim strToWhom As String
Dim strMsgBody As String
Dim strSubject As String
strSubject = QueryID & " - " & Fin_InvNo & " - " & Qry_QryType & "Query"
strToWhom = ""
strMsgBody = Qry_PropAddress1 & vbNewLine & Qry_Description
DoCmd.SendObject , , , strToWhom, , , strSubject, strMsgBody, True
End Sub
I have two questions:
1) How do I compile text and fields into a string (as I have tried to do in
the "strSubject" above but doesn't seem to work). Is there something I am
missing?
2) The code above is in a button on the sub form. Some of the fields I
require are from the main form. I have tried the usual referencing but
doesn't work.
Cheers