Link to home
Start Free TrialLog in
Avatar of SOTA
SOTAFlag for Canada

asked on

How to parse a URL for Google Maps from SQL Address table

I have an Access 97 database with Customers. I wish to parse the address field into a URL that can be opened with Google Maps.
Has anyone done this before so I do not have to re-invent the wheel?
I see there are certain parameters to use in order for the URL to work properly.
I have the addresses stored in SQL tables.

Address1
Address2
Province/State
City
Zip/Postal Code
Country

Any suggestions please?
Thanks!
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SOTA

ASKER

Yea! I just implemented a similar approach! Google needs "+" between address elements, so I use a FindReplace to ensure proper parsing:
TargetURL = rs![Address1] & "+" & rs![Address2] & "+" & rs![City] & "+" & rs![Abbreviation] & "+" & rs![Country]
TargetURL = FindAndReplace(TargetURL, Chr(32), Chr(43))
TargetURL = "https://www.google.com/maps/place/" & TargetURL

Open in new window

Avatar of SOTA

ASKER

Oh, how do I accept your answer? Experts-Exchange keeps changing their website!
Avatar of SOTA

ASKER

Figured it out! Thanks for your help!!!
You're welcome.