mailing labels - square box at end of first line in report

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
Scott_Brasted
12/3/2009 9:11:11 PM
access.reports 4434 articles. 0 followers. Follow

8 Replies
1100 Views

Similar Articles

[PageSpeed] 25

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
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
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
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
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
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
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
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
Scott_Brasted
12/4/2009 9:54:23 PM
Reply:

Similar Artilces:

junk mail filter doesn't work with rules?
Hello, I receive mail from many pop3 accounts and mailing lists. I use rules to organize the mail within my mailbox. One problem I am having is that the junk mail filter does not screen mail that is affected by the rules. So for instance, I get an email from some alternate account that I have. The mail comes in and gets picked up by the rule and moved to the appropriate folder. When this happens, the junk mail filter never checks the message. Only mail left in the Inbox is screened. Can someone help figure out how to make this work or does anyone have a workaround? I'd hate to ...

VBA to check for latest version of front end?
I have a split database where the users have a local copy of the frontend. I would like to use VBA to check whether the users have the mostrecent version. I have set up the following tables:tVersion-Back-End (link to table in the BackEnd version)tVersion-FrontEnd (local table in the FrontEnd version)Each has a field Version where I am planning to put in the versionnumbers.Now, I am just starting to use VBA in my Access projects. Can someonepoint me to some coding to accomplish my task above? Can someone alsopoint me to a good resource (book, website, course) that would take mefrom a beginn...

Can E-mail recipient policy be linked to the OU membership?
Running Exchange 2003 (mixed mode) and Windows 2003 server (Windows 2000 mixed mode): I'd like to create a e-mail recipient policy that is linked to the different OU's that are created on the system. Is it possible to link the policy to a specific OU or do I need to create groups on the AD to control which recipients a policy applies to? Martin Moustgaard Yes, you can create a recipient policy that looks to just a specific OU. It is done through LDAP queries. Here are some references to articles and whitepapers that discuss how to work with recipient policies. 249299.KB.EN-US HO...

Outlook Send/Receive mail SLOW
When I receive/send email, it loads sends/receives extremely slow. The percentage indicator when receiving/sending starts at 3-5% and stays that way for awhile. After several minutes, the mail eventually comes through. Any reason for this? ...

open two different Access reports
Hi, I was wondering if i can get some help here. I have two different reports that i want to open when a user clicks a button to view the reports for printing. Is there any way of popping them up at the same time in VBA? Thank you in advance Associates wrote: >Hi, > >I was wondering if i can get some help here. I have two different reports >that i want to open when a user clicks a button to view the reports for >printing. Is there any way of popping them up at the same time in VBA? > >Thank you in advance Yes. Call the DoCmd.OpenReport command twic...

Sort by Credit Card Type on EDC Detail Report
What do I have to do to get my EDC Detail Report to show different credit card types, like Visa, MC or Amex. Now under Tender Type, it just shows Credit card...well...I kinda knew that. How do I fix it? add tender types for each credit card type rather than just "credit card". then z out. all transactions after this change will reflect what you want in the reports. "tl" <tl@discussions.microsoft.com> wrote in message news:A54EEC95-208C-4962-A089-84B22A67632A@microsoft.com... > What do I have to do to get my EDC Detail Report to show different credit >...

shortcut with command line switch probs
Hello, I have a shortcut set up which has the target declared as: "C:\Program Files\Microsoft Office\Office\EXCEL.EXE" / "\\path_to_file\myfile.xlt" This works fine on my PC. Excel 2000 running on Windows XP. Unfortunately it doesnt work on someone elses PC, who asked for m help! They have the same software set up, and access to the same folde path. When they try to run the shortcut, a window opens and closes almos immediately. Help?! : -- soloto ----------------------------------------------------------------------- solotoo's Profile: http://www.excelforum.com/m...

Setting up a new e-mail account
I'm trying to set up my yahoo account so that I receive my e-mail messages in my Outlook Inbox. I went to Accounts, and servers, and put in mail.yahoo.com for incoming mail (POP3) and smtp.yahoo.com for outgoing mail (smtp). When I click on the send/receive button I get an error message. Dave <anonymous@discussions.microsoft.com> wrote: > I'm trying to set up my yahoo account so that I receive > my e-mail messages in my Outlook Inbox. I went to > Accounts, and servers, and put in mail.yahoo.com for > incoming mail (POP3) and smtp.yahoo.com for outgoing mail &...

Receiving POP3 mail into Outlook without Send/Receive
I want the POP3 mail to be received into Outlook (If open) when the mail arrives in POP3 account. Is that possible? Set an Automatic Polling Interval. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, delanda asked: | I want the POP3 mail to be received into Outlook (If open) when the | mail arrives in POP3 account. Is that possible? ...

Replying to an Outlook e-mail
When replying to e-mail in Outlook, everything works fine. But when I try to reply to an e-mail that has an embedded picture in it, Outlook won't send it. I get the message that the e-mail was sent, but it stays in the outbox and never sends. Any suggestions? -- Jack "Jack Johnson" <hotshotz@comcast.net> wrote in message news:D6C50AC7-EB37-4B54-9611-F9F42F1F1BA0@microsoft.com... > When replying to e-mail in Outlook, everything works fine. But when I try to > reply to an e-mail that has an embedded picture in it, Outlook won't send > it. &...

Input to custom reports
Hello, I'd like to be able to input values to a custom report like the Year. Is there any way to package a custom report and provide input to it? Every year the user has to go into the custom report and change the Year restriction. Alternatively, (this is a payroll report), is there any global variable or some other back door that I can use to get the current year in a custom report? Given the report writer may not be the ticket what would the recommendation be to create custom reports that require input? VB.NET? -- Russ Using VBA you can allow for input in the custom reports. B...

running reports from MS CRM prompt for username and password
Senario: When running a report from Microsoft CRM client it prompts for username and password. When given it's runs the report correct question: if MS CRM 3 is configured correctly is it normal that when trying to generate a report in MS CRM prompt for username and password? No, ideally it should pass the users AD credentials to the reporting IIS server (single sign on). If you were to close the browser and run a different report does it still prompt for credentials? I've noticed this does also depend on the hostname. For instance if the reporting server uses a differe...

Adding a combo box to a worksheet
Hi all, I'm re-creating one of our paper forms in Excel and I'd like to add combo boxes to some blanks on the form to allow the user to choose a name from a list. I know a little about Excel formulas and no VB code at all...what's the idiot-proof way to do this? Thanks, Chris Hi Chris, The easiest way is to right-click within Excel in the toolbars area and select the "Forms" toolbar. Then Forms toolbar should then appear and could can select the "Combo Box" icon and click on that. If you can't tell which icon represents the Combo Box, just hover yo...

How do I bind a XAML text box control to a dataset?
Hello; I am new to using WinFx and I am having trouble figuring out how to bind a text box to a field in a dataset. I found an MSDN article: http://msdn2.microsoft.com/en-us/library/ms752057.aspx My question deals with the text box code: <TextBlock Text="{Binding Path=ISBN}" Grid.Column="1" /> How does this text box know to bind to the field "ISBN" in "myDataSet"? How does the control implement the dataset? Thank you Monty ...

Creating Text Box in Publisher 2007 Crashes the Application
Hello, we have a clean install of Publisher 2007 under Windows XP SP2, and when we try to create a text box in a document, (both an existing document and a blank document), publisher crashes. Office is fully patched. I ran Office Diagnostics from the help menu and no problems were found and the issue persists. Any thoughts on how to resolve the issue? Thanks, Syd See if selecting a different printer as default helps. How to view error signatures if an Office program experiences a serious error and quits http://support.microsoft.com/kb/289508/en-us -- Mary Sauer MSFT MVP http://of...

Saving e-mail & attachments when upgrading
I'm upgrading from NT4 to XP Home and the only data I need to keep are the emails & attachments. I have to format the hard drive to eliminate the partitions. This machine is on a network and I can save to the other machune. Look here for all the information you need on backup and restoration of Outlook data: http://www.slipstick.com/config/backup.htm -- Jocelyn Fiorello MVP - Outlook *** Replies sent to my e-mail address will probably not be answered -- please reply only to the newsgroup to preserve the message thread. *** "Mike" <mike@hosemart.com.au> wrote ...

Create Exchange mailbox from command line
I'm writing a script using dsadd and I was wondering if it's possible to create an exchange mailbox from the command line. Donovan Maybe not exactly what you want but it may help: http://www.joeware.net/win/free/tools/exchmbx.htm -- Neil Hobson Exchange MVP For Exchange news, links, and tips, check: http://www.msexchangeblog.com "Donovan Linton" <DonovanLinton@discussions.microsoft.com> wrote in message news:D9C839EF-883D-4E2E-8BE9-57782582F043@microsoft.com... > I'm writing a script using dsadd and I was wondering if it's possible to > create an ...

Indirect Method for Name Box Variable? #2
DARN The reason I want to do this is that I have to collect data on a dail basis but I have to display it on a graph on a weekly basis. I select the entire week of cells and give it a name like week52. The following week I have to select the entire week and name i week53. Everything is set up that I can just copy and the numbers will progres for whatever length of time I need to graph (months, years, etc) excep this. Maybe I'll just go back to using the range of cell numbers. Thanks guys -- Chris Brenna ----------------------------------------------------------------------- Chris Bre...

Adding a word to the end of other words at the same time
I was wondering if there was a way to add a word to the end or beginning of multiple other words in Excel. Example; say I have these 3 words.... Alpha Beta Tera Now I want to add LLC to the end of each word but I want to change them all at the same time. Like Alpha LLC Beta LLC Tera LLC Is there a way to do that? Phil Its Excel 2003 try Sub addtexttoend() For Each c In Selection c.Value = c & " xxx" Next End Sub -- Don Guillett SalesAid Software donaldb@281.com "phil" <ptukey@charter.net> wrote in message news:1125340358.873337.4240@g44g2000cwa.googlegroup...

Sizing drop down validation box
I have a form with lots of drop down validation boxes, many of them are Yes,No,N/A or Pass,Fail,N/A so one a narrow box is required but all the drop downs are about three inches wide. Once I accidentally go them to the right size and saved the file, closed it, then re-opened and the drop downs were really wide again. Does anyone know have to set the width, I always thought they were the same width as the cell they pop from but not the case. Wayman Those extra wide dropdown lists appear occasionally, usually if cells on the worksheet have been merged (not necessarily the cell with t...

how to install Microsoft Mail to Outlook 2003
pls help I found 'this' (http://www.outlook-tips.net/howto/msmail.htm) on www.outlook-tips.net I don't know if it works... ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ It does. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Search for answers: http://groups.google.com Most recent posts to the Outlook newsgroups: ...

I want to add a mail account without setting a SMTP server. Is it possible?
I want to add a second mail account that is outside my company. Since the company firewall does not allow us to connect to SMTP-servers I want to add this account without setting the SMTP propertiy. I cannot specify the company server as it is an Exchange server and the outside one an IMAP one. Currently I have specified the outside SMTP server since outook does not allow me to add an account wihtout setting this. I keep getting annoying error messages as my computer can't connect to the outside SMTP. Any one know a way around this? cheers, mortb The company server has SMTP enabled, u...

Selecting the Right Text Alignment for a edit box doesn't work
When I select right text alignment in the edit control properties, the text is still left aligned when I run the program. What am I doing wrong Thanks Dan Dan, "Dan" <anonymous@discussions.microsoft.com> a �crit dans le message de news:DECFE605-A130-416B-9924-60BA0C79D684@microsoft.com... > When I select right text alignment in the edit control properties, the text is still left aligned when I run the program. What am I doing wrong? > I've no idea :-))) You can open your RC-file as text, and make sure it has the ES_RIGHT style set, thus: EDITTEXT IDC...

Report to show Item Class Distribution Amounts
We would like to create a report, using Crystal Reports, that would show the following: dollar amount break down of the Sales Distribution accounts (COGS and Sales) per item class based on a date range. What is the most accurate way of going about this? We could only think of this method: (in short) sum the Ext Price based on SOP30300.CSLSINDX and SLSINDX and hope it matches the SOP10102 summed distribution amounts. Any advice would be appreciated. Thanks in advance. With the SLSINDX you would use the Extended Price and the CSLSINDX you would use Extended Cost. You would probably ...

Duplicate E-Mail #4
Every time I get e-mail from certain users I get their e-mail twice. I have not been able to figure out why this is happening. Is it their fault or my fault and if it is my fault, how do I fix it? Thanks, Al Alfred Kaufmann <al_kaufmann@hotmail.com> wrote: > Every time I get e-mail from certain users I get their e-mail twice. I > have not been able to figure out why this is happening. Is it their > fault or my fault and if it is my fault, how do I fix it? See if this helps: http://www.howto-outlook.com/faq/duplicates.htm -- Brian Tillman [MVP-Outlook] ...