Report problems???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm writing a report that has Last name, first name & spouse. I have wrtten
an expression that does not send the spouses name to the second line id its
too long and it prints the "&" even if there is no spouse.
 
I'm writing a report that has Last name, first name & spouse. I have wrtten
an expression that does not send the spouses name to the second line id its
too long and it prints the "&" even if there is no spouse.

Why don't you post your expression, and what you want the result to
look like, both with the Spouse name and without it?
 
Last Header
=Left$(txtLast),1)
Detail
=[LAST]&","&[FIRST]&" & "&[SPOUSE]

Prints Out:
With Spouse populated
Langseth, James & Mary

With Spouse Field blank
Langseth, James &
I would like not for & to print

I also would like the spouse to go to the second line if it is too long

Langseth, James
& Mary
 
Last Header
=Left$(txtLast),1)
Detail
=[LAST]&","&[FIRST]&" & "&[SPOUSE]

Prints Out:
With Spouse populated
Langseth, James & Mary

With Spouse Field blank
Langseth, James &
I would like not for & to print

I also would like the spouse to go to the second line if it is too long

Langseth, James
& Mary

fredg said:
Why don't you post your expression, and what you want the result to
look like, both with the Spouse name and without it?

Here is one way:
=[LAST] & "," & [FIRST] & IIf(IsNull([Spouse]),"", " & " & [SPOUSE])

Here is another way:
=[LAST] & "," & [FIRST] & (" & " + [SPOUSE])

If you want the Spouse's name to appear on the next line only if the
text is too long, set the control's CanGrow property to Yes.
Also set the Detail Section CanGrow to Yes (unless you are doing this
as mailing labels).

If you ALWAYS want the Spouse's name to appear on the next line, then:

=[LAST] & "," & [FIRST] & IIf(IsNull([Spouse]),"", chr(13) & chr(10) &
"& " & [SPOUSE])

or..

=[LAST] & "," & [FIRST] & (chr(13) & chr(10) & "& " + [SPOUSE])
 
Thanks. Your Great!!!

It's a two column report that prints on 8.5" x 5.5". I set my column widths
in set up
It also contains Address, Home Phone, Work Phone and email address all on
seperate lines.

Would you write that in 1 expression or would you use several text boxes?
Many do not have all the feilds populated in their record.


fredg said:
Last Header
=Left$(txtLast),1)
Detail
=[LAST]&","&[FIRST]&" & "&[SPOUSE]

Prints Out:
With Spouse populated
Langseth, James & Mary

With Spouse Field blank
Langseth, James &
I would like not for & to print

I also would like the spouse to go to the second line if it is too long

Langseth, James
& Mary

fredg said:
On Tue, 3 Jan 2006 14:53:02 -0800, James Langseth wrote:

I'm writing a report that has Last name, first name & spouse. I have wrtten
an expression that does not send the spouses name to the second line id its
too long and it prints the "&" even if there is no spouse.

Why don't you post your expression, and what you want the result to
look like, both with the Spouse name and without it?

Here is one way:
=[LAST] & "," & [FIRST] & IIf(IsNull([Spouse]),"", " & " & [SPOUSE])

Here is another way:
=[LAST] & "," & [FIRST] & (" & " + [SPOUSE])

If you want the Spouse's name to appear on the next line only if the
text is too long, set the control's CanGrow property to Yes.
Also set the Detail Section CanGrow to Yes (unless you are doing this
as mailing labels).

If you ALWAYS want the Spouse's name to appear on the next line, then:

=[LAST] & "," & [FIRST] & IIf(IsNull([Spouse]),"", chr(13) & chr(10) &
"& " & [SPOUSE])

or..

=[LAST] & "," & [FIRST] & (chr(13) & chr(10) & "& " + [SPOUSE])
 
Thanks. Your Great!!!

It's a two column report that prints on 8.5" x 5.5". I set my column widths
in set up
It also contains Address, Home Phone, Work Phone and email address all on
seperate lines.

Would you write that in 1 expression or would you use several text boxes?
Many do not have all the feilds populated in their record.

fredg said:
Last Header
=Left$(txtLast),1)
Detail
=[LAST]&","&[FIRST]&" & "&[SPOUSE]

Prints Out:
With Spouse populated
Langseth, James & Mary

With Spouse Field blank
Langseth, James &
I would like not for & to print

I also would like the spouse to go to the second line if it is too long

Langseth, James
& Mary

:

On Tue, 3 Jan 2006 14:53:02 -0800, James Langseth wrote:

I'm writing a report that has Last name, first name & spouse. I have wrtten
an expression that does not send the spouses name to the second line id its
too long and it prints the "&" even if there is no spouse.

Why don't you post your expression, and what you want the result to
look like, both with the Spouse name and without it?

Here is one way:
=[LAST] & "," & [FIRST] & IIf(IsNull([Spouse]),"", " & " & [SPOUSE])

Here is another way:
=[LAST] & "," & [FIRST] & (" & " + [SPOUSE])

If you want the Spouse's name to appear on the next line only if the
text is too long, set the control's CanGrow property to Yes.
Also set the Detail Section CanGrow to Yes (unless you are doing this
as mailing labels).

If you ALWAYS want the Spouse's name to appear on the next line, then:

=[LAST] & "," & [FIRST] & IIf(IsNull([Spouse]),"", chr(13) & chr(10) &
"& " & [SPOUSE])

or..

=[LAST] & "," & [FIRST] & (chr(13) & chr(10) & "& " + [SPOUSE])

Probably several text controls would do, one under the other.
Set each control's CanGrow property to Yes.

=[LAST] & "," & [FIRST] & IIf(IsNull([Spouse]),"", " & " & [SPOUSE])
[Address]
[Home Phone]
[Work Phone]
 
** snipped **
Probably several text controls would do, one under the other.
Set each control's CanGrow property to Yes.

=[LAST] & "," & [FIRST] & IIf(IsNull([Spouse]),"", " & " & [SPOUSE])
[Address]
[Home Phone]
[Work Phone]
[/QUOTE]

Ooops!
I meant to write:
Set each control's CanShrink property to Yes.
 
Back
Top