Greetings,
I use the following expression to print mailing labels. When there is a
company name in the record, everything is fine. When there is not a company
name, I get a small square box at the end of the name on the first line. Any
thoughts on what I am missing?
This expression is in the query. "SendTo" is in the report detail section
SendTo: ([CustomerName] & Chr(13) & Chr(10) + [CompanyName] & Chr(13) & Chr
(10) & [Address] & Chr(13) & Chr(10) & [CSZ])
fields involved are all from the same table, record source is a query:
CustomerName: ([ContactFirstName] & " " & [ContactLastName]) - expresiion
form 2 text fields
CompanyName - table text field
Address - table text field
CSZ: ([City] & ", " & UCase([StateOrProvince]) & " " & [PostalCode]) -
expression from 3 text fields
Here is SQL for query:
SELECT Clients.ClientID, Clients.CompanyName, Clients.Address, Clients.City,
Clients.StateOrProvince, Clients.PostalCode, Clients.Country, Clients.
ContactLastName, Clients.ContactFirstName, Clients.ContactTitle, Clients.
PhoneNumber, Clients.FaxNumber, Clients.ReferredBy, Clients.Notes, Clients.
email, Clients.cellnumber, ([ContactFirstName] & " " & [ContactLastName]) AS
CustomerName, ([City] & ", " & UCase([StateOrProvince]) & " " & [PostalCode])
AS CSZ, ([CustomerName] & Chr(13) & Chr(10)+[CompanyName] & Chr(13) & Chr(10)
& [Address] & Chr(13) & Chr(10) & [CSZ]) AS SendTo
FROM Clients
ORDER BY Clients.ContactLastName, Clients.ContactFirstName;
Thanks,
Scott
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200912/1
|
|
0
|
|
|
|
Reply
|
Scott_Brasted
|
12/3/2009 9:11:11 PM |
|
Try:
SendTo: ([CustomerName] & Chr(13) + Chr(10) + [CompanyName] & Chr(13) &
Chr(10) & [Address] & Chr(13) & Chr(10) & [CSZ])
--
Duane Hookom
Microsoft Access MVP
"Scott_Brasted via AccessMonster.com" wrote:
> Greetings,
>
> I use the following expression to print mailing labels. When there is a
> company name in the record, everything is fine. When there is not a company
> name, I get a small square box at the end of the name on the first line. Any
> thoughts on what I am missing?
>
> This expression is in the query. "SendTo" is in the report detail section
> SendTo: ([CustomerName] & Chr(13) & Chr(10) + [CompanyName] & Chr(13) & Chr
> (10) & [Address] & Chr(13) & Chr(10) & [CSZ])
>
> fields involved are all from the same table, record source is a query:
> CustomerName: ([ContactFirstName] & " " & [ContactLastName]) - expresiion
> form 2 text fields
> CompanyName - table text field
> Address - table text field
> CSZ: ([City] & ", " & UCase([StateOrProvince]) & " " & [PostalCode]) -
> expression from 3 text fields
>
> Here is SQL for query:
> SELECT Clients.ClientID, Clients.CompanyName, Clients.Address, Clients.City,
> Clients.StateOrProvince, Clients.PostalCode, Clients.Country, Clients.
> ContactLastName, Clients.ContactFirstName, Clients.ContactTitle, Clients.
> PhoneNumber, Clients.FaxNumber, Clients.ReferredBy, Clients.Notes, Clients.
> email, Clients.cellnumber, ([ContactFirstName] & " " & [ContactLastName]) AS
> CustomerName, ([City] & ", " & UCase([StateOrProvince]) & " " & [PostalCode])
> AS CSZ, ([CustomerName] & Chr(13) & Chr(10)+[CompanyName] & Chr(13) & Chr(10)
> & [Address] & Chr(13) & Chr(10) & [CSZ]) AS SendTo
> FROM Clients
> ORDER BY Clients.ContactLastName, Clients.ContactFirstName;
>
> Thanks,
> Scott
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200912/1
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
12/3/2009 10:07:02 PM
|
|
Duane,
Zippity do dah! Thank you. I thought it woudl be simple fiix. What does
adding a plus instead of an ampersand in this case do? Does the Chr(10) go
the CmompanyName?
Thanks,
Scott
Duane Hookom wrote:
>Try:
>SendTo: ([CustomerName] & Chr(13) + Chr(10) + [CompanyName] & Chr(13) &
>Chr(10) & [Address] & Chr(13) & Chr(10) & [CSZ])
>
>> Greetings,
>>
>[quoted text clipped - 29 lines]
>> Thanks,
>> Scott
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200912/1
|
|
0
|
|
|
|
Reply
|
Scott_Brasted
|
12/4/2009 3:57:05 AM
|
|
I thought you would know what the difference is between + and & since your
initial post used them. The + will propogate a null value.
--
Duane Hookom
Microsoft Access MVP
"Scott_Brasted via AccessMonster.com" wrote:
> Duane,
>
> Zippity do dah! Thank you. I thought it woudl be simple fiix. What does
> adding a plus instead of an ampersand in this case do? Does the Chr(10) go
> the CmompanyName?
>
> Thanks,
> Scott
>
> Duane Hookom wrote:
> >Try:
> >SendTo: ([CustomerName] & Chr(13) + Chr(10) + [CompanyName] & Chr(13) &
> >Chr(10) & [Address] & Chr(13) & Chr(10) & [CSZ])
> >
> >> Greetings,
> >>
> >[quoted text clipped - 29 lines]
> >> Thanks,
> >> Scott
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200912/1
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
12/4/2009 5:58:01 AM
|
|
Duane,
I'm sorry I must not have phrased my question correctly. I do know the
difference between & and +. However, I do not know much about chr(10) and
chr(13). So I did not know where to put the + in regard to the chr(10) and
chr(13) for the CompanyName field. I really appreciate your help with this.
I guess my question should have been how does the + relate to the chrs and
the field in this case.
Again thanks,
Scott
Duane Hookom wrote:
>I thought you would know what the difference is between + and & since your
>initial post used them. The + will propogate a null value.
>
>> Duane,
>>
>[quoted text clipped - 14 lines]
>> >> Thanks,
>> >> Scott
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200912/1
|
|
0
|
|
|
|
Reply
|
Scott_Brasted
|
12/4/2009 3:47:56 PM
|
|
Chr(13) will display a square box when used without the Chr(10).
If CompanyName is Null then the entire expression below is Null:
Chr(13) + Chr(10) + [CompanyName]
If CompanyName is Null then the expression below returns Chr(10) which is
the square:
Chr(13) & Chr(10) + [CompanyName]
--
Duane Hookom
Microsoft Access MVP
"Scott_Brasted via AccessMonster.com" wrote:
> Duane,
>
> I'm sorry I must not have phrased my question correctly. I do know the
> difference between & and +. However, I do not know much about chr(10) and
> chr(13). So I did not know where to put the + in regard to the chr(10) and
> chr(13) for the CompanyName field. I really appreciate your help with this.
> I guess my question should have been how does the + relate to the chrs and
> the field in this case.
>
> Again thanks,
> Scott
>
> Duane Hookom wrote:
> >I thought you would know what the difference is between + and & since your
> >initial post used them. The + will propogate a null value.
> >
> >> Duane,
> >>
> >[quoted text clipped - 14 lines]
> >> >> Thanks,
> >> >> Scott
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200912/1
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
12/4/2009 5:05:01 PM
|
|
Actually, I believe it will return Chr(13) not Chr(10). The precedence of the
operators would perform the + concatenate first and then the & concatenate.
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Duane Hookom wrote:
> Chr(13) will display a square box when used without the Chr(10).
>
> If CompanyName is Null then the entire expression below is Null:
> Chr(13) + Chr(10) + [CompanyName]
>
> If CompanyName is Null then the expression below returns Chr(10) which is
> the square:
> Chr(13) & Chr(10) + [CompanyName]
>
|
|
0
|
|
|
|
Reply
|
John
|
12/4/2009 5:38:13 PM
|
|
Of course. Thanks John.
--
Duane Hookom
Microsoft Access MVP
"John Spencer" wrote:
> Actually, I believe it will return Chr(13) not Chr(10). The precedence of the
> operators would perform the + concatenate first and then the & concatenate.
>
> John Spencer
> Access MVP 2002-2005, 2007-2009
> The Hilltop Institute
> University of Maryland Baltimore County
>
> Duane Hookom wrote:
> > Chr(13) will display a square box when used without the Chr(10).
> >
> > If CompanyName is Null then the entire expression below is Null:
> > Chr(13) + Chr(10) + [CompanyName]
> >
> > If CompanyName is Null then the expression below returns Chr(10) which is
> > the square:
> > Chr(13) & Chr(10) + [CompanyName]
> >
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
12/4/2009 8:36:01 PM
|
|
Thank you both. I appreciate the info. Learn every day.
Best,
Scott
Duane Hookom wrote:
>Of course. Thanks John.
>
>> Actually, I believe it will return Chr(13) not Chr(10). The precedence of the
>> operators would perform the + concatenate first and then the & concatenate.
>[quoted text clipped - 14 lines]
>> >
>> .
--
Message posted via http://www.accessmonster.com
|
|
0
|
|
|
|
Reply
|
Scott_Brasted
|
12/4/2009 9:54:23 PM
|
|
|
8 Replies
260 Views
(page loaded in 3.546 seconds)
Similiar Articles: Removing Empty Line - microsoft.public.access.reports... via this forum) to remove the first empty line if ... strPhoneFormat) & vbCrLf End ... Concatenating Fields in a Text Box to Remove Blank Lines... mailing label report ... Label in Multi column report - microsoft.public.access.reports ...... multi-column report that prints labels in the first ... label on same line ... Label in Multi column report ... Microsoft Report Viewer creating Multi Column/Mailing Labels ... Labels printing in alphabetical order! - microsoft.public.access ...... dialog in the report ... labels, and they end up wasting ... Sort My List - Alphabetize, Remove Line Breaks, Add Labels ... Answer Box: Print mailing labels in Word ... change control source or value of text box - microsoft.public ...... PURC_ORDER_LINE when I do this (square brackets at begining and end of ... error" on the report when ever the line ... Setting A Label's Visibilty Based On A Text Box Value ... Placing Clip Art on Labels Problem - microsoft.public.word ...... of labels with my return address to ... the label text in the Address box ... return address labels in Microsoft ... last line of your return address, then press the "End" key ... textbox content not visible... - microsoft.public.access.reports ...... also a summary at the end of the order lines ... all the textboxes to labels, which seem to work better in report ... wrote: > A list box is rarely useful in a report. Command Button Enabled/Disabled Based on Text in Text Box ...Indent your code lines between If and Else and Else and End If ... name the text box after the field it's linked to, if it's a label, I ... on Text in Text Box ... square ... Making page display horizontal? - microsoft.public.mac.office.word ...When you first ... rows in a report based ... Do you mean >> solid >> horizontal lines at the end ... click Square, and then under Horizontal ... Return Address Labels With ... Query duplicates results due to many-to-many relationships ...Place a text box bound to the Date field (which ... option is to do as Bruce says and group the report first by ... but showing the date and location on the first line of ... Page visible when check box marked - microsoft.public.access ...... Me.FIELD2.Visible = False End If You ... in the form's On >[quoted text clipped - 20 lines ... check box on one form which ... of the check box on the first ... Shipping Labels, Mailing Labels, Round Labels in Stock - ULINEOver 170 varieties of Shipping Labels, Mailing Labels, Round Labels, Colored Labels and Adhesive Labels in Stock. Order by 6 pm for same day shipping. Over 25,000 ... USPS - The United States Postal Service (U.S. Postal Service)... information on our most convenient and affordable shipping ... End of sub links; Send Mail go to Manage Your Mail header ... Reserve or Renew a PO Box™ › File an Insurance Claim › Boxes , Cardboard Boxes , Corrugated Boxes & Shipping Boxes in ...Over 1 million cardboard shipping boxes shipped each day! Order by 6 pm for same day ... Electronics : Box Guide - How to find the right box. FedEx Ship Manager@fedex.com SupportThis report is generated after the end of day close ... option, a box labeled Process return label with ... or reprint the Shipping label. The original shipment must first be ... Creating Microsoft Access Reports - Free Online TutorialsIf you are saving for the first time, the Save As dialog box appears. ... to add and drag it onto your report. A thick line ... When printing mailing labels, you can usually ... 7/31/2012 3:50:50 PM
|