Need help with FollowHyperlink

utzja1

Registered User.
Local time
Today, 06:46
Joined
Oct 18, 2012
Messages
97
I am developing a database for a client that will be run using Access 2007. I have Access 2010 installed on my machine but have a gentleman in my office with Access 2007 that helps me test the database by entering data, beta-testing macros for compatibility, etc. The subroutine below works fine on my machine (2010) but bombs out on his (2007). [MyCoord] is a string assembled by a query that concatenates latitude/longitude values into the Google maps standard lookup text, so when the User clicks the button, an Internet Explorer window launches with a map for a given location. Comments and suppositions greatly appreciated.

Private Sub Command165_Click()

If IsNull([MyCoord]) = False Then
Application.FollowHyperlink [MyCoord]
End If

End Sub
 
So is this not working? OR any error?

See what is inside the "MyCoord", make sure it is a valid address.. If it is a Web page make sure it is preceded by http://
 
OK, I just slipped over to his desk and I get the following error message when I try to run this module in Access 2007.

Run-time Error '1190'
An unexpected error has occurred.

When the Debugger opens, it is pointing directly to Application.FollowHyperlink.

Many thanks for the quick response, any thoughts on this?
 
Here is the expression for [MyCoord] from the source query:

MyCoord: "http://maps.google.com/maps?q=" & [CoordX] & "," & [CoordY] & "&iwloc=A &hl=en"

Hope this helps. Thanks again.
 
That's fine.. I am asking after generation.. What is the Proper String.. Have you attempted to Debug the rendered String in the Immediate Window??
 
OK, here is the string from the Immediate window for a typical location. This launches Google Maps on my machine.
http://maps.google.com/maps?q=37.634235,-77.503828&iwloc=A &hl=en

When Google Maps is launched, here is the URL that displays in the address bar when this location comes up.
https://maps.google.com/maps?q=37.634235,-77.503828&iwloc=A+&hl=en

Two differences that I see: (http: versus https:) and a (+) behind (...iwloc=A+&hl). Could it be as simple as updating the [MyCoord] expression to the newer Google URL text?
 
I'm researching Run Time Error 1190 in the meantime and it looks like it's a registry-based issue. So the problem may not be associated with Access at all but rather be located in the guts of Windows itself. Looks like the solution might involve un-install/re-install of Access on this other gentleman's machine.
 

Users who are viewing this thread

Back
Top Bottom