Back to Browse

Microsoft Access - Modern Web Browser Control - Interact With a Webpage

1.7K views
Nov 10, 2023
20:02

In this video I demonstrate how we can use some simple VBA/JavaScript to interact with the loaded webpage. This video is in answer to several questions I've received in the past several month regarding automating the Microsoft Access Modern Web Browser control. I cover: • Retrieving a webpage element's value/text • Populating the value/text of an element on a webpage • Submitting a webpage form • Clicking a webpage button • Setting the focus to a specific webpage element EXTRA Info (from the comments): So the original hard coded code was: Me.EdgeBrowser0.ExecuteJavascript "document.getElementById('sb_form_q').value = 'Microsoft Access Modern Web Browser';" and say we wanted to pass the value from a form control, we would simply do: Me.EdgeBrowser0.ExecuteJavascript "document.getElementById('sb_form_q').value = '" & Me.YourControlName & "';" If you want to push a value from a table you could use a recordset: Me.EdgeBrowser0.ExecuteJavascript "document.getElementById('sb_form_q').value = '" & rs!FieldName & "';" Or use DLookUp(): Me.EdgeBrowser0.ExecuteJavascript "document.getElementById('sb_form_q').value = '" & DLooklUp("FieldName", "TableName", "ID=1") & "';" My Links: • https://www.cardaconsultants.com/ • https://www.devhut.net/

Download

1 formats

Video Formats

360pmp431.6 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Microsoft Access - Modern Web Browser Control - Interact With a Webpage | NatokHD