Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Address String returns blank rows

Status
Not open for further replies.

hermantb

Programmer
Aug 30, 2002
18
US
I have Account and Address tables linked on AddressID. If I structure a report to show the Account, Address1, City, State, Zip as individual fields then each account row indeed shows the corresponding address info. I merged those fileds into a formula as follows:
{ADDRESS.ADDRESS1}&", "&{ADDRESS.ADDRESS2}&", "&{ADDRESS.CITY}&", "&{ADDRESS.STATE}&", "&{ADDRESS.POSTALCODE}

This results in only about 20% of accounts having the address string. Why isn't the data filling in on all accounts?

Any ideas are appreciated.
 
Hi !

Probably it is because one ore more of the fields includes a NULL value.

Then the whole formula become empty.

Maybe your address2 is not filled every time.

/Goran
 
Thanks...You information was helpful and I didn't know one null field would hide the whole row. In case anyone has this issue again here is what I got to work:

dim add1 as string
dim add2 as string
dim city as string
dim state as string
dim zip as string

If isnull({ADDRESS.ADDRESS1})= True then add1 = "." else add1 = {ADDRESS.ADDRESS1}
If isnull({ADDRESS.ADDRESS2}) = True then add2 = "." else add2 = {ADDRESS.ADDRESS2}
If isnull({ADDRESS.CITY}) = True then city = "." else city = {ADDRESS.CITY}
If isnull({ADDRESS.STATE}) = True then state = "." else state = {ADDRESS.STATE}
If isnull({ADDRESS.POSTALCODE}) = True then zip = "." else zip = {ADDRESS.POSTALCODE}

formula = add1&", "&add2&", "&city&", "&state&", "&zip
 
Hi !

If you don´t want the punctation you can just leave it like
If isnull({ADDRESS.ADDRESS1})= True then add1 = "" else add1 = {ADDRESS.ADDRESS1}


/Goran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top