Hello all,
I have a letter report that is based off of customer information. The customers can have either a mailing address or a phsyical address but there will always be a physical address.
I want the mailing address to take precedence over the physical address if there is a mailing address, otherwise I want the physical address to show.
Now this wouldn't be a problem if there wasn't a Street 2 field. If there is no street 2 or mailstreet 2 entered, then I want the report to put the city, state and zip (Either Mailing or Physical) on that line.
So far here is what I have on the query:
PCSZ = Physical City, State, Zip
MCSZ = Mailing City, State, Zip
Adressline2: Iif([MailingStreet2] is null,[MCSZ],iif([Street2] is null,[PCSZ],"fields are all blank"
I know that statement does not work! But I have no idea how to do an else if statement in the query. I was thinking it could be done in a module and I could call it on the Open_Report event but I have very limited coding knowledge. Am I just going about this the wrong way or have I been up to long?
Any help is appreciated.
Chris
I have a letter report that is based off of customer information. The customers can have either a mailing address or a phsyical address but there will always be a physical address.
I want the mailing address to take precedence over the physical address if there is a mailing address, otherwise I want the physical address to show.
Now this wouldn't be a problem if there wasn't a Street 2 field. If there is no street 2 or mailstreet 2 entered, then I want the report to put the city, state and zip (Either Mailing or Physical) on that line.
So far here is what I have on the query:
PCSZ = Physical City, State, Zip
MCSZ = Mailing City, State, Zip
Adressline2: Iif([MailingStreet2] is null,[MCSZ],iif([Street2] is null,[PCSZ],"fields are all blank"
I know that statement does not work! But I have no idea how to do an else if statement in the query. I was thinking it could be done in a module and I could call it on the Open_Report event but I have very limited coding knowledge. Am I just going about this the wrong way or have I been up to long?
Any help is appreciated.
Chris