If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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/For...ports/200912/1 |
#2
|
|||
|
|||
mailing labels - square box at end of first line in report
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/For...ports/200912/1 . |
#3
|
|||
|
|||
mailing labels - square box at end of first line in report
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/For...ports/200912/1 |
#4
|
|||
|
|||
mailing labels - square box at end of first line in report
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/For...ports/200912/1 . |
#5
|
|||
|
|||
mailing labels - square box at end of first line in report
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/For...ports/200912/1 |
#6
|
|||
|
|||
mailing labels - square box at end of first line in report
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 squa 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/For...ports/200912/1 . |
#7
|
|||
|
|||
mailing labels - square box at end of first line in report
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 squa Chr(13) & Chr(10) + [CompanyName] |
#8
|
|||
|
|||
mailing labels - square box at end of first line in report
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 squa Chr(13) & Chr(10) + [CompanyName] . |
#9
|
|||
|
|||
mailing labels - square box at end of first line in report
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 |
Thread Tools | |
Display Modes | |
|
|