Reputation: 364
I have an Microsoft Access Database which uses webBrowser controls to display Google Maps that are dynamically created based on information selected.
Beginning February 17, 2015, they have stopped working and I receive this error:
Hmm, I cant add an image due to my reputation, but it says:
An error has occured in the script on this page.
Line: 2 Char: 279 Error: Could not get the display property. Invalid Argument. Code: 0 URL:
Our company's IT guy has eliminated the possibility of the error being caused on our end, thus suggesting it is on Google's side. I have since found this:
It seems Google had an update the same day. I have tried to specify the api version to use in my google maps, but that did nothing.
I also set a new webBrower to reference the 'Hello World' example provided by Google, but receive the same error.
Basically, anything with Google Maps is not working. If I build a simple html page with text if works. If I use google.com it works.
Any suggestions?
Upvotes: 2
Views: 5570
Reputation: 1
or add items to registry
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"YourApp.exe"=dword:00001F40
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DOCUMENT_COMPATIBLE_MODE]
"YourApp.exe"=dword:00001F40
WebBrowser acts as IE7, but now google maps API does not accept IE7 any more. so, we must explicitly change a compatible mode of WebBrowser from ie7 to ie8.
Upvotes: 0
Reputation: 99
I also had is problem recently (for what seemed like no reason). One day I opened my Access application that uses the Access WebBrowser control, and suddenly Google Maps said the browser version was not supported. Strangely, it was working perfectly fine the day before, so I'm not sure what triggered this problem?!?!
Anyway, I did some research on this problem and melanion's answer was pretty close, but I think I can help out a little more here. By default, the Access WebBrowser control uses IE7. So the trick is to add the following registry keys to get Access to target the specific version of IE that you want to use. You can add the following keys to your registry to target IE11:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
MSACCESS.EXE=11001 (dword)
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DOCUMENT_COMPATIBLE_MODE]
MSACCESS.EXE=11001 (dword)
This works for both 32-bit and 64-bit Access, regardless of whether you are on a 32-bit or 64-bit version of Windows. Also, you can use the [HKEY_LOCAL_MACHINE] key, instead of the [HKEY_CURRENT_USER] if you want to do force it for all users on that machine. And just to make it super easy, I've provided the code to make a batch script file to do all of this work for you automatically:
ForceAccessUseIE11.bat
(the file extension must be "bat" to run this batch automatically)Place the following lines of code in it:
reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" /v MSACCESS.EXE /t REG_DWORD /d 11000
reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DOCUMENT_COMPATIBLE_MODE" /v MSACCESS.EXE /t REG_DWORD /d 11000
Save the file and then double click it to run it and the keys will be added for you.
Finally, I will say that you can also target any version of IE that you want to with the Access WebBrowser control. Here is a list of the values that you might want to use:
Anyway, I hope this information is helpful to you too. This problem caused me quite a headache and several hours of research to figure it out. But this fix seemed to work perfectly for me, so I hope it helps you too!
Upvotes: 3
Reputation: 11
I had the same problem and I changed in my script the API version to 3.19 (error was with v=3.20 or v=3.exp). So, if you change your script to "https://maps.googleapis.com/maps/api/js?v=3.19" or anything else before 3.20 it might be fine
Upvotes: 1