animallover
asked on
Open Google Chrome to a specific address from MS Access
Hi all
I have an access database that contains addresses. I need to be able to click on a button that will open the chrome browser, navigate to https://earth.google.com/web/ and, getting the data from the fields in the database, navigate to that address. Everyone is allowed to use either IE, Chrome, or Firefox as their browser but Google Earth will only work in Chrome so I need it to open Chrome specifically.
Thank you
I have an access database that contains addresses. I need to be able to click on a button that will open the chrome browser, navigate to https://earth.google.com/web/ and, getting the data from the fields in the database, navigate to that address. Everyone is allowed to use either IE, Chrome, or Firefox as their browser but Google Earth will only work in Chrome so I need it to open Chrome specifically.
Thank you
ASKER
That didn't work for me. I get an error that says "The expression On click you entered as the event property setting produced the following error: A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control."
Well, the code I posted didn't have any "on click" in it?
Debug when you get that error, what line is executing ?
»bp
Debug when you get that error, what line is executing ?
»bp
ASKER
I need to eventually have the user click a button and open google earth with data from the form so I added the LaunchChrome ("www.google.com") to the on click of the button. There is no debug option, just OK.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I appreciate your help with this. I haven't had the time to look yet so it will have to wait until Monday.
Okay, understand, happens to me too, let me know how it goes next week.
»bp
»bp
ASKER
Finally able to get back to this and I am so close. Thank you for the sample DB it helped a lot and I got it working except for using the address on my form to open google earth to that address. Here is what I have:
Private Sub Map_Click()
Dim strAddress As String
Dim strLink As String
strAddress = Me.PhysicalAddress & " " & Me.PhysicalCity & ", " & Me.PhysicalState
strLink = "https://earth.google.com/web?q=" & strAddress
LaunchChrome strLink
End Sub
It opens up Google Chrome to Google Earth but not to the address. In the URL the address is concatenated but it doesn't actually go to it. This is what it looks like (I changed the actual address)
https://earth.google.com/web/?q=1234+W+SOMEWHERE+CRT+TUCSON,+AZ
Any suggestions?
Private Sub Map_Click()
Dim strAddress As String
Dim strLink As String
strAddress = Me.PhysicalAddress & " " & Me.PhysicalCity & ", " & Me.PhysicalState
strLink = "https://earth.google.com/web?q=" & strAddress
LaunchChrome strLink
End Sub
It opens up Google Chrome to Google Earth but not to the address. In the URL the address is concatenated but it doesn't actually go to it. This is what it looks like (I changed the actual address)
https://earth.google.com/web/?q=1234+W+SOMEWHERE+CRT+TUCSON,+AZ
Any suggestions?
Well, we have answered the original question you asked and that is working now. The problem you are having now is specific to Google Earth and the URL parameters and search "api". It may not be possible. But you are unlikely to get knowledgeable people in this question based on topics.
Best course of action would be to close this question as solved, and then open a new question not about the coding aspect of what you are trying to do, but rather the Google URL format and search syntax. Find some topics that relate to that URL syntax just entered from a browser, and then just update this code once you get that.
»bp
Best course of action would be to close this question as solved, and then open a new question not about the coding aspect of what you are trying to do, but rather the Google URL format and search syntax. Find some topics that relate to that URL syntax just entered from a browser, and then just update this code once you get that.
»bp
ASKER
The rest is part of my original question but I will ask in a separate question. Thank you for your help.
Open in new window
»bp