Need Expression for Envelope Report

G

Guest

WinXP Envelope report based on form connected using unique ClientID# on form
and report. Use Command Button to open envelope report.
Q1: How do I create an expression that is applicable to the form -record-I
am viewing?
The following are the fields used in the envelope report:
[Trim=([Prefix FatherPrefix]& " "&[Firstname Father]&" "&[LastName Father]&"
"and" "&[Prefix Mother]& " "&[Firstname Mother]&" "&[LastName Mother])
Q2: I can't get rid of the word *and* when I don't have a Mr. and Mrs., but
rather a Ms. or Mr. How do I make *and* and field so I can shrink it?
Joan
 
M

Mike Labosh

Q1: How do I create an expression that is applicable to the form -record-I
am viewing?
The following are the fields used in the envelope report:
[Trim=([Prefix FatherPrefix]& " "&[Firstname Father]&" "&[LastName
Father]&"
"and" "&[Prefix Mother]& " "&[Firstname Mother]&" "&[LastName Mother])
Q2: I can't get rid of the word *and* when I don't have a Mr. and Mrs.,
but
rather a Ms. or Mr. How do I make *and* and field so I can shrink it?

= Trim(=([Prefix FatherPrefix]& " "&[Firstname Father]&" "&[LastName
Father]& Iif(Len([LastName Father]) > 0 And Len([LastName Mother]) > 0, "
and ", "") &[Prefix Mother]& " "&[Firstname Mother]&" "&[LastName Mother])

Thanks! That was fun!
 
G

Guest

Problems: 1) I made a typo in the first field in the string:it should read
PrefixFather.
2) I get an error message when trying to close expression:
"You have entered a comma without a preceding value or identifier."
Expression:
=Trim(=[(PrefixFather]&" " &[FirstNamne Father]&" " &[LastName Father]&
Iif(Len([LastName Father]) > 0 And Len([LastName Mother]) > 0,"and
","")&[PrefixMother]& " "&[Firstname Mother]&" "&[LastName Mother])

Can you help me with this? Thanks.
Joan

Mike Labosh said:
Q1: How do I create an expression that is applicable to the form -record-I
am viewing?
The following are the fields used in the envelope report:
[Trim=([Prefix FatherPrefix]& " "&[Firstname Father]&" "&[LastName
Father]&"
"and" "&[Prefix Mother]& " "&[Firstname Mother]&" "&[LastName Mother])
Q2: I can't get rid of the word *and* when I don't have a Mr. and Mrs.,
but
rather a Ms. or Mr. How do I make *and* and field so I can shrink it?

= Trim(=([Prefix FatherPrefix]& " "&[Firstname Father]&" "&[LastName
Father]& Iif(Len([LastName Father]) > 0 And Len([LastName Mother]) > 0, "
and ", "") &[Prefix Mother]& " "&[Firstname Mother]&" "&[LastName Mother])

Thanks! That was fun!
--
Peace & happy computing,

Mike Labosh, MCSD
"I have no choice but to believe in free will."
 

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