A family of Microsoft relational database management systems designed for ease of use.
Hello,
I've taken my testing a step further with the Edge browser control.
I used a report and a form with multiple records.
Here are my latest results regarding changing the background of the Edge browser control in Access LTSC 2024.
Reports in preview mode
In VBA, it's impossible to modify the content of the HTML file and see the effects on subsequent records in the report events. The browser control always keeps the first HTML file in memory and sometimes crashes Access.
The method used for the test was to create an HTML file with a different name containing the image and background color for each record.
The HTML file paths are placed in a table field. This field is linked to the browser control's source code.
For another application, I used a different method because I only had one image to display for a single record.
My HTML file is created on demand for the report view, with a different name each time.
The file name is stored in a 'TempVars' variable, which are native Access temporary variables designed specifically for direct access by queries.
In my report query, I created a calculated field that concatenates the HTML file path and its name.
This field is linked to the browser control's source control.
These two principles work perfectly.
The only problem is the slower report display time.
Forms
The only solution that works correctly and quickly is using the 'ExecuteJavaScript' method with the creation of a style (CSS) to define the design and visual presentation of a web page, including the image file transformed into a binary array with the desired background color.
All other solutions fail when scrolling through records. Only the first image remains displayed.
Please find my test application attached.
Due to site restrictions, you must rename the TestNvEdge.txt file to TestNvEdge.zip in order to use it.
Best regards.