Do you use the Web Browser control in any of your Microsoft Access applications?
There are several reasons you may want to embed a web browser control in an application. Perhaps you want to make use of showing product pictures that you store on your company website in your in-house inventory application. Or you may want to get information from specific websites to then store and use as data. Or you may want to display data using a web based utility like Google Maps to show addresses or routes, or Power BI to show reports. Microsoft Access has provided a web browser control for your use for many years. In recent years, however, changes in support for the underlying engine for this control have created concerning issues.
What are the concerning issues for the Legacy Web Browser control?
The legacy web browser control is based on Internet Explorer 11 MSHTML (Trident) engine. As you may know, Microsoft Support for the IE Desktop application ended 6/15/2022. Support for IE Mode in Microsoft Edge or the MSHTML (Trident) engine will continue at least thru 2029. However, many websites are now being designed for the Microsoft Edge browser engine. You may find that opening these web sites throw script errors, render incorrectly, or refuse to render at all with the legacy Microsoft Access Web Browser control. Power BI reports are one example. Microsoftonline.com is an example of a website which displays a nice message “Microsoft 365 applications and services no longer support Internet Explorer 11.” It advises you to “Continue in Microsoft Edge”.
Some companies now prohibit the use of the Legacy Web Browser control available in Microsoft Access because of concerns that security updates are not being sufficiently applied to this older engine.
What is the path forward?
One other caveat – if you develop in a version of Microsoft Access that has the new control, but your user base runs the application on older versions of Access, you should wait to use this new control. Fortunately you would still be able to open an application that contains the newer control with an older version of Access, but the new control will rend blank. This might be a case for maintaining two versions of a form during your application migration cycle, one with the old control for older versioned clients, the other with the new control.
Do I have to migrate to the new Edge Browser control now?
Both controls are now available in Microsoft Access so your old legacy web browser controls will continue to function at least to the degree that they are functioning now. The old browser control is now available on the bottom row of the form controls drop down (circled in red in the diagram on the left below.) The new Edge Web Browser control is located on the top row of the Form Design Controls drop down (circled in red in the diagram on the right below.)
At this point, you should make sure that for any NEW development in Microsoft Access that uses a web browser control, you use the NEW Edge Web Browser unless you have an older version user base (see above). You should also gradually phase out any previous use of the Legacy Web Browser control. The new control gives you better and more secure results.
Me.txtHTML = Me.WebBrowser1.Object.Document.getElementsByTagName(“table”)(0).innerHTML
Any other advantages of the new control?
Yes – the new Edge Browser control works in continuous forms, something the old control did not do! This might be particularly handy, for example if you had list of websites and wanted to show a preview, or a list of inventory items to show a web based thumbnail.
Any other caveats?
There are two other issues regarding the new Edge Browser control that catch some people by surprise. To lock down security, Microsoft has purposefully set the control so that unless specified, any forwarding to a different domain done by the initially set website, brings up the new domain in your normal default web browser outside of the application. For clarification, you can still have a form where the web control is bound to a data field that contains a website URL. Moving from record to record, the bound website URL displays as the record changes within the form. However, if the web browser control is displaying a particular website, and you click on something on that web page that redirects to a different domain, then that by default it does NOT render in your web browser control. Instead it opens your default browser and displays there. I have seen this with a http:// that redirects to https://. I have also seen this with a login that redirects to some type of login service. To provide secure control and keep your redirection within your web control inside your Access application, you can set the new TrustedDomains property to a table that contains a list of domains which you trust and it is OK to redirect to.
The second caveat is that to display local files, you must prefix the path name with https://msaccess/YourFullPathName.