PC Review


Reply
Thread Tools Rate Thread

RE: HELP! with email code

 
 
=?Utf-8?B?RGFuaWVs?=
Guest
Posts: n/a
 
      21st Feb 2007
1-
strSubject = QueryID & " - " & Fin_InvNo & " - " & Qry_QryType & "Query"
where are QueryID, Fin_InvNo, Qry_QryType defined? or are they control
within the subform?If so, I'd do
strSubject = Me.QueryID & " - " & Me.Fin_InvNo & " - " & Me.Qry_QryType &
"Query"

2- To ref forms and subforms... I use
Forms![FormName]![SubFormname]![...].Form.[ControlName]
So in your case simply use the simplest form of the above listed code
Forms![FormName].Form.[ControlName]

Daniel






"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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?c2N1YmFkaXZlcg==?=
Guest
Posts: n/a
 
      21st Feb 2007

1. For some reason it didn't work but does now
2. Thanks for the referencing. Mine wasn't quite right.

"Daniel" wrote:

> 1-
> strSubject = QueryID & " - " & Fin_InvNo & " - " & Qry_QryType & "Query"
> where are QueryID, Fin_InvNo, Qry_QryType defined? or are they control
> within the subform?If so, I'd do
> strSubject = Me.QueryID & " - " & Me.Fin_InvNo & " - " & Me.Qry_QryType &
> "Query"
>
> 2- To ref forms and subforms... I use
> Forms![FormName]![SubFormname]![...].Form.[ControlName]
> So in your case simply use the simplest form of the above listed code
> Forms![FormName].Form.[ControlName]
>
> Daniel
>
>
>
>
>
>
> "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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Code: Email Object Record to an Email Address displayed in F =?Utf-8?B?cGVycGxleGVk?= Microsoft Access Macros 0 8th Jun 2007 12:16 AM
Run code on new email Steve Microsoft Outlook VBA Programming 1 20th Mar 2007 07:12 AM
[New] Zipoid - ZIP Code, City Name and Area Code Lookup - Zip Code to Zip Code Distance Calculation Mel Freeware 0 22nd Jul 2005 05:13 PM
email code =?Utf-8?B?TWFyaWU=?= Microsoft Frontpage 4 28th Oct 2004 04:36 PM
Code for validating email address in C# - validate email Henrik Nyberg Microsoft C# .NET 1 8th Aug 2003 11:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:33 PM.