Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

force uppercase in report text box

Status
Not open for further replies.

THWatson

Technical User
Apr 25, 2000
2,601
CA
Using Access 2003 (Access 2000 format)

I'm trying to understand something that occurs in an address label report. Common garden variety Avery label, 3 across, 10 down.

One text box pulls in the full name. The name I will use as an example is Bruce & Margaret McCorquodale. The text box is set to Can Grow and Can Shrink. The font is set to Arial 9.

Canada Post prefers that all address lines be in uppercase letters.

However, if I put ">" in the Format line for Properties for that particular text box, I end up with
BRUCE & MARGARET ... with the MCCORQUODALE disappearing.

If I force uppercase back in the query the result is the same.

If I format the text box itself, by using Format(FullName,">") the result is
BRUCE & MARGARET
MCCORQUODALE ... with the last name appearing left-aligned on a second line. This, even though all the names are there, looks weird.

If I leave the formatting to be Proper case, the result is
just fine.
Bruce & Margaret McCorquodale

I assume it has something to do with the lack of proportional characterization when forcing to upper case, but that doesn't totally account for the complete disappearance of the last name when using the ">" on the Format line of Properties.

Any work-around for this?

Thanks.

Tom
 
Duane

Using UCase results in
BRUCE & MARGARET
MCCORQUODALE ... with the last name appearing left-aligned on a second line. Same as using Format(FullName,">")

Maybe that's the result I have to live with if I want all uppercase. Just looks weird to have the last name on a second line.

There's only 2 in the list that have names that long.

Tom
 
I can solve that particular name this way.

The field that is brought in is "CreditTo" so change the Control Source for that to
Code:
=Trim(IIf(Len([CreditTo])>28,[CreditTo],UCase([CreditTo])))

This results in that name displaying on the label as
Bruce & Margaret McCorquodale

All others will display in uppercase, except for one which is longer still, and it displays as
Andrew & Lorraine Newton-
Comar


So I have to decide which looks better
Bruce & Margaret McCorquodale
or
BRUCE & MARGARET
MCCORQUODALE


Tom
 
Isn't the second line just the result of word wrap and "Can Grow" so the value fits within the text box?

Is it not true that if the text box was much wider or the font was smaller the value would appear all on one line?

I think this is just typical, expected behaviour.

Duane
Hook'D on Access
MS Access MVP
 
Duane
Yes, the second line is the result of word wrap and "Can Grow."

As for the box width and font size...I can't make the box any wider than it is, and going smaller than 9 is too small.

What got me into this in the first place had to do with the fact that I put the Greater Than character (>) on the Format line of the Properties for that field. And that resulted, for some strange reason, in the label showing only
BRUCE & MARGARET
with the last name, MCCORQUODALE, disappearing completely. No word wrap to the second line at all.

To conform to Canada Post preferences, I want labels to print in upper case. Clearly, using ">" on the Format line doesn't work if it causes the last name to disappear. So now I have to decide what to do about exceptionally long names, and have to decide whether to go with
Bruce & Margaret McCorquodale
or
BRUCE & MARGARET
MCCORQUODALE


Tom
 
If you need to you can change the font size

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Select Case Len(Me.LastName)
Case Is < 8
Me.LastName.FontSize = 12
Case Is > 8 < 10
Me.LastName.FontSize = 10
Case Is > 10
Me.LastName.FontSize = 8
End Select
End Sub
 
MajP
I see where you are going with this but I have to go down to a font size of 7 in order for the name "Bruce & Margaret McCorquodale" to fit on one line.

The church secretary has decided she prefers
Bruce & Margaret McCorquodale
to
BRUCE & MARGARET
MCCORQUODALE

This seems to do what she wants.
Code:
=Trim(IIf(Len([CreditTo])>28,[CreditTo],UCase([CreditTo])))

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top