Question

I'm using MS Access 2013, Referencing MS HTML Object Library. I load my page the following way:

Dim rc As DAO.Recordset
Set rc = CurrentDb.openRecordset("SELECT * FROM DBSettings WHERE title = 'pageMain'")
Webbrowser0.Object.Document.Open
Webbrowser0.Object.Document.write rc!content
Webbrowser0.Object.Document.Close
Set body = Hpage.getElementById("body")

This works pretty well, BUT the mouse pointer is flickering when moving mouse (Nomal - Hourglass). Is there a way to resolve this?

EDIT: Yes, it actually does not flicker when loading a local(exactly the same) file. This has 2 disadvantages: 1) the db should be standalone so the file should be loaded from a table 2) a security warning when calling js functions from vba

Anyone knows a better way of dynamically loading without local file?

Was it helpful?

Solution

Thanks I've found a solution for this problem. As this problem is easy to reproduce in Access 2010 and 2013 I'll post it here:

  • This happens when the webbrowsercontrol is changed BEFORE the first DoEvents. (Form OnLoad, calling function directly after opening form)

Solution:

  • set the control source to about:blank (prevent security warning and 404)
  • a "DoEvents" BEFORE the .Open command
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top