Stuart McLachlan
stuart at lexacorp.com.pg
Mon May 4 12:01:37 CDT 2009
He's using the plus signs correctly :-) & and + are the same thing for strings except where Nulls are concerned. ([Names.name]+Chr(13)+Chr(10)) will return a valid name plus CRLF, but if the name is Null, it will return Null - so it won't throw a blank line. ([Names.name] & Chr(13) & Chr(10)) will return the same for a valid name, but will return a CRLF by itself if the name is Null - resulting in a blank first line. The problem with the extra space results from the two occurences of & " " & One possibility is to replace them with & IIF(ISNULL([Names_1.name],""," ") & and & IIF(ISNULL([Names_2.name],""," ") & On 4 May 2009 at 11:25, Gary Kjos wrote: > I think you have a problem with where you are using the plus sign for > concatination verses the Ampersand. You may be aware of that which is > why you are using a combination but I would try to replace all the + > signs with ambersands and see if it clears your problem. I'm not clear > on the exact difference between the two or I would elaborate. > > Good luck with it. > > GK > > On Mon, May 4, 2009 at 6:57 AM, Kostas Konstantinidis <kost36 at otenet.gr> wrote: > > dear group, > > > > I am using the follown query before a report... > > > > Director: ([Names.name]+Chr(13)+Chr(10)) & ([addr1_dir1]+Chr(13)+Chr(10)) & > > ([addr2_dir1]+Chr(13)+Chr(10)) & ([TK_dir1] & " " & > > [T_perioxi.perioxi]+Chr(13)+Chr(10)) & ([T_town.poli]+Chr(13)+Chr(10)) & > > ([T_kratos.kratos]+Chr(13)+Chr(10)) & > > ([Names_1.name]+Chr(13)+Chr(10)) & ([addr1_dir2]+Chr(13)+Chr(10)) & > > ([addr2_dir2]+Chr(13)+Chr(10)) & ([TK_dir2] & " " & > > [T_perioxi_1.perioxi]+Chr(13)+Chr(10)) & ([T_town_1.poli]+Chr(13)+Chr(10)) & > > ([T_kratos_1.kratos]+Chr(13)+Chr(10)) & > > ([Names_2.name]+Chr(13)+Chr(10)) & ([addr1_dir3]+Chr(13)+Chr(10)) & > > ([addr2_dir3]+Chr(13)+Chr(10)) & ([TK_dir3] & " " & > > [T_perioxi_2.perioxi]+Chr(13)+Chr(10)) & > > ([T_town_2.poli]+Chr(13)+Chr(10))+[T_kratos_2.kratos] > > > > Please, I need some help with two questions > > 1. If the sequences Names_1.name and Names_2.name are blank (have no data) > > then to the end of the field > > Director returns a space character and an enter character too > > 2. Is there any way to print in bold only the Names.Name, Names_1.name and > > Names_2.name > > > > many thank's > > /kostas > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > > -- > Gary Kjos > garykjos at gmail.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >