Link to home
Create AccountLog in
Microsoft Access

Microsoft Access

--

Questions

--

Followers

Top Experts

Avatar of Taras
Taras🇨🇦

MS Access web browser with google map not working on a form

I have an issue using web browser control for google map on a form. 

In next environment:  Runing MS Access from Microsoft 365 apps for business.

On pc with W10 64

Web browser Version 120.0.6099.130 (Official Build) (64-bit)

Microsoft Edge Version 120.0.2210.91 (Official build) (64-bit)

On a form( frmCustomer)  in  load event to suppress error msg I have this part of code :

 Private Sub Form_Load()

Me.WB_Map.Object.Silent = True

End Sub

In a module I have a function ( fAppendString ) that doing append address string and is working without any issue:

On the form frmCustomer there are several text boxes with client address info and web browser control which I want to  use to show google map on the form.

On form current event I have code below.

When I open form or move to next record on form code run and it shows properly google map in control and after a secund or two map disappeared  and inside control shows another google screen,  one I  attached here.

Not sure what is happening I did adjust my registry entry to: 

(HKey_Local_Machine\Software\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION) to prowin.exe = 12001 

(HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MAIN\FEATURECONTROL\FEATURE_BROWSER_EMULATION) = Msaccess.exe = 12001

 but still showing the same result. 

Private Sub Form_Current()

    On Error GoTo Error_Handler

    Dim sAddr  As String

    Dim sURL   As String

    sAddr = fAppendString(sAddr, Me.txtStreetNumber, "")

    sAddr = fAppendString(sAddr, Me.txtStreet, " ")

    sAddr = fAppendString(sAddr, Me.txtCity)

    sAddr = fAppendString(sAddr, Me.txtProvince_State)

    sAddr = fAppendString(sAddr, Replace(Nz(Me.txtPostal_Code_Zip, ""), " ", ""))

    sAddr = fAppendString(sAddr, Me.txtCountry)

    If sAddr <> vbNullString Then

        sAddr = Replace(sAddr, " ", "+")

        sURL = "https://maps.google.ca/maps?q="

        sURL = sURL & sAddr & "&hl=en"

        Me.URL = sURL

         Me.WB_Map.ControlSource = "=""" & sURL & """"

        DoEvents

    Else

         Me.WB_Map.ControlSource = "=""about:blank"""

    End If 

Error_Handler_Exit:

    On Error Resume Next

    Exit Sub

Error_Handler:

    MsgBox "The following error has occurred." & vbCrLf & vbCrLf & _

           "Error Number: " & Err.Number & vbCrLf & _

           "Error Source: Form_Current" & vbCrLf & _

           "Error Description: " & Err.Description, _

           vbCritical, "An Error has Occurred!"

    Resume Error_Handler_Exit

End SubUser generated image

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Jim Dettman (EE MVE)Jim Dettman (EE MVE)🇺🇸

You need to be sure you are using the new Edge Browser Control.  The new control is available to O365 subscribers who have version 16.0.16327.20214 and up.


https://support.microsoft.com/en-au/office/use-the-edge-browser-control-on-a-form-f9f731be-8f9b-4dd2-a5cb-525cfaed52d5


The old browser control at this point will most likely not work as the latest emulation it offered was IE11 and as you can see from your screenshot, Google doesn't even mention IE anymore as Microsoft depreciated it and has since removed it from Windows.


Jim.


Avatar of TarasTaras🇨🇦

ASKER

Hi Jim, 

I tried with new Edge Browser control, the same code. It opens Google map but  not in the Edge Browser control, it opens google map it in browser. I want map to be in forms control, not sure what I have to do to get it open in Edge Browser control?

 And what will happend with old web controls that are created with MS Access 2010/13/...will they work now without IE.



With the new Edge Browser control, any redirect or link encountered will cause it to open in a regular browser outside of your app.


To prevent this, you need to add a Trusted Domain list as table (single column), then reference that in the Trusted Domain property of the control.   Table can be named anything, as can the field.


Jim.




Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of TarasTaras🇨🇦

ASKER

Hi Jim you said.....Trusted Domain list as table(single column), then reference that in ......

Ok I understand,  I will create separate table with one field. What is entered in that one field of Trusted Domain list?


ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)Jim Dettman (EE MVE)🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of TarasTaras🇨🇦

ASKER

Hi Jim it still not working,  I attached here a test db file and you will se on the form "Frm_Contact_New_Control_Edge_Browser" it is not showing map in control.

I created a table and set value in control properties to reference table. 

MSAccessMap3.accdb


Avatar of TarasTaras🇨🇦

ASKER

Thank you so much Jim for help, I will submit another question for last issue I mentioned.


Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Sorry I didn't get back to this (not sure why you selected a solution).   I don't have access to the edge browser control at the moment to test this.   Had planned on switch my laptop to the current channel of Office so I could, but the end of the year has been pretty busy.


I'll try and get to this today.


Jim.


Avatar of TarasTaras🇨🇦

ASKER

Hi JIm you helped me with TrustDomain issue,  it moved solution close to finalization and I assume that somethin minor has to be solved to get this  working. For that thank you so much.

Microsoft Access

Microsoft Access

--

Questions

--

Followers

Top Experts

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.