Followup for Sending Email with POC

G

Guest

I Have Just added the following to the end of this code.

& POC_Name = DLookup("[C1_PM_POC]", "Col_1St_PM"), , True

When I run it I only get a 0 in the Msg text. I also added Dim POC_Name As
String. If I take it out
Dim POC_Name As String
& POC_Name = DLookup("[C1_PM_POC]", "Col_1St_PM")
It works

DoCmd.SendObject acSendNoObject, , , "(e-mail address removed)", , ,
"College First Pay Inquiry for " & [indiv_name] & ", SSN:" & [ind_ssn], "" _
& "A Pay Inquiry is being requested For " & [indiv_name] & ", SSN:" _
& [ind_ssn] & vbCrLf & vbCrLf & "DEP In Date:" & [DEPInDate] & vbCrLf &
vbCrLf & "Enrollment Dates:" _
& vbCrLf & [REMARKS] & vbCrLf & vbCrLf & POC_Name = DLookup("[C1_PM_POC]",
"Col_1St_PM"), , True
 
G

Guest

That is because you are adding True/False. Bit by bit:
& (the first char) indicates that you want to concatenate the following to
whatever is already there
POC_Name=DLookup(...) resolves to True/False, that is does POC_Name equal
DLookup()?
Terry
 
G

Guest

I think Yes. The DLookup is looking at a table that only has one record on
it. I did a post today "Sending Email with POC" and I think that I did the
code right. Getting over my head. I read POC_Name is getting its data from
the DLookUp a table "Col_1St_PM" and checking field "Col_1St_PM" for the name
of the POC.

The ,,True at the end of the statment is the end of the DoCmd.SendObject
acSendNoObject.

Does this help!??

Terry said:
That is because you are adding True/False. Bit by bit:
& (the first char) indicates that you want to concatenate the following to
whatever is already there
POC_Name=DLookup(...) resolves to True/False, that is does POC_Name equal
DLookup()?
Terry

KAnoe said:
I Have Just added the following to the end of this code.

& POC_Name = DLookup("[C1_PM_POC]", "Col_1St_PM"), , True

When I run it I only get a 0 in the Msg text. I also added Dim POC_Name As
String. If I take it out
Dim POC_Name As String
& POC_Name = DLookup("[C1_PM_POC]", "Col_1St_PM")
It works

DoCmd.SendObject acSendNoObject, , , "(e-mail address removed)", , ,
"College First Pay Inquiry for " & [indiv_name] & ", SSN:" & [ind_ssn], "" _
& "A Pay Inquiry is being requested For " & [indiv_name] & ", SSN:" _
& [ind_ssn] & vbCrLf & vbCrLf & "DEP In Date:" & [DEPInDate] & vbCrLf &
vbCrLf & "Enrollment Dates:" _
& vbCrLf & [REMARKS] & vbCrLf & vbCrLf & POC_Name = DLookup("[C1_PM_POC]",
"Col_1St_PM"), , True
 
G

Guest

I think you asre confusing what I am saying or I am confusing what you are
saying.
Yes. The TRUE as the last parameter of the SendObject command determines
whether the email will be displayed for additional editing or just sent.

I was under the understanding that
& POC_Name = DLookup(...)
is part of the message or subject. What is this being concatenated to? In
assigning text to, say, a field this would be concatenating True/False to
that field as POC_Name = DLookup(...) resolves to True/False, either POC_Name
equals DLookup(...) or it is not equal. I am not sure what effect
concatenating True/False has to a string - somebody else may be able to
answer that. I think what you should have, and this is a guess, is
& DLookup("[C1_PM_POC]", "Col_1St_PM")
Cheers
Terry

KAnoe said:
I think Yes. The DLookup is looking at a table that only has one record on
it. I did a post today "Sending Email with POC" and I think that I did the
code right. Getting over my head. I read POC_Name is getting its data from
the DLookUp a table "Col_1St_PM" and checking field "Col_1St_PM" for the name
of the POC.

The ,,True at the end of the statment is the end of the DoCmd.SendObject
acSendNoObject.

Does this help!??

Terry said:
That is because you are adding True/False. Bit by bit:
& (the first char) indicates that you want to concatenate the following to
whatever is already there
POC_Name=DLookup(...) resolves to True/False, that is does POC_Name equal
DLookup()?
Terry

KAnoe said:
I Have Just added the following to the end of this code.

& POC_Name = DLookup("[C1_PM_POC]", "Col_1St_PM"), , True

When I run it I only get a 0 in the Msg text. I also added Dim POC_Name As
String. If I take it out
Dim POC_Name As String
& POC_Name = DLookup("[C1_PM_POC]", "Col_1St_PM")
It works

DoCmd.SendObject acSendNoObject, , , "(e-mail address removed)", , ,
"College First Pay Inquiry for " & [indiv_name] & ", SSN:" & [ind_ssn], "" _
& "A Pay Inquiry is being requested For " & [indiv_name] & ", SSN:" _
& [ind_ssn] & vbCrLf & vbCrLf & "DEP In Date:" & [DEPInDate] & vbCrLf &
vbCrLf & "Enrollment Dates:" _
& vbCrLf & [REMARKS] & vbCrLf & vbCrLf & POC_Name = DLookup("[C1_PM_POC]",
"Col_1St_PM"), , True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top