MS Access Reports- Setting up a Address from SSMS

Hi Experts,

I have this:
([Label5] + "") & ([Label6] + "") & ([City] + "") & ([State] + "") & ([ZipCode] + '') & ([Country] + "")

Open in new window

Just checking if this is correct for the Control Source, it comes from SSMS Stored Procedure?

Thanks for any help...
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Assuming you have the Label controls and all those fields on your Report, it should work.
Gustav BrockCIOCommented:
It seems of no purpose to me:

    ([Label6] + "") returns Null if Label6 is Null, and the content of Label6 if it is not Null.

So does:


on its own as well.

So a lot of code for nothing.

Amour22015Author Commented:
The reason is that it is looking for not any of the fields to be blank

([Label5] + "") & ([Label6] + "") & ([City] + "") & ([State] + "") & ([ZipCode] + '') & ([Country] + "")
Label5 = 999 Best Street
Label6 = Blank
City = Washington
State = DC
Zipcode = Blank
Country = US

So label6 And Zipcode would be blank causing a 2 large blanks in the string.
999 Best Street                Washington DC                 US

It would need to look like:
999 Best Street Washington DC US

So I need to look for any blanks/nulls?

Thank for helping....
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Gustav BrockCIOCommented:
But it doesn't work that way:

([Label5] + "") & ([Label6] + "") & ([City] + "")

will return:

? ("999 Best Street" + "") & (Null + "") & ("Washington" + "")
999 Best StreetWashington

So will:

[Label5] & [Label6] & [City]

? "999 Best Street" & Null & "Washington"
999 Best StreetWashington

What you have in mind is probably:

([Label5] + " ") & ([Label6] + " ") & ([City] + " ")

? ("999 Best Street" + " ") & (Null + " ") & ("Washington" + " ")
999 Best Street Washington


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Amour22015Author Commented:
So I just needed to space "" to " " ok thanks....
Gustav BrockCIOCommented:
Yes - and you wouldn't need it for the very last field.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.