Wortz, Charles
CWortz at tea.state.tx.us
Tue Apr 15 07:42:11 CDT 2003
Paul, The reason is because you are creating "" strings instead of leaving the Nulls in there. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net] Sent: Tuesday 2003 Apr 15 06:57 To: accessd at databaseadvisors.com Subject: [AccessD] Gaps in Address Query To all, I posted this a couple of days ago, and had a few responses to help me along the way (Thanks Very Much), however I have the following inside a query : AddressDetail: [Name] & Chr(13) & Chr(10)+IIf(IsNull([addrs1]),"",[addrs1]+Chr(13)+Chr(10))+IIf(IsNull([ad drs2]),"",[addrs2]+Chr(13)+Chr(10))+IIf(IsNull([town]),"",[town]+Chr(13) +Chr(10))+IIf(IsNull([county]),"",[county]+Chr(13)+Chr(10))+[postcode] Basically, if a part of the address line is null then I want to shift the address up, if not put the field in and move onto the next line. The query runs ok, however there are still line gaps in the address where the field is blank. I have tried various combinations including changing the + to & and only using + for the chr(13)+chr(10), and the query still comes out the same. Anyone any ideas as to why this is happening ? Paul Hartland