Hi
QueryID, Fin_InvNo and Qry_QryType look to be variables but I can't see
where they are declared or how you are giving them a value.
Your strSubject line looks fine other then the variables look meaningless
for the reason above.
Cheers.
BW
"scubadiver" wrote:
> 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
|