Local file in new webbrowser control (1 Viewer)

Status
Not open for further replies.

MsAccessNL

Member
Local time
Today, 02:12
Joined
Aug 27, 2022
Messages
219
Did something change? I have Access 2024 and don’t succeed in opening a local html file. Also not with” file and msaccess” added. It worked before. I downloaded the example db from ********, but also no success.
 
Last edited by a moderator:
I don't have A2024 but I've just re-checked and it still works for me in A365 using .ControlSource
The prefix should be https://msaccess before the file path

1761398836416.png

Today, I'm having issues with .Navigate though that also worked in the past.

Have you tried both setting the local file address using both .Navigate and .ControlSource
What error(s) do you see?

If its a timeout error, have you tried the hosts file 'hack' that accelerates local file loading
 
.Navigate and .Controlsource don't work, no error. If I set the controlsource by hand in the settings, it will work (bit slowly). I didn't tried the hosts server hack (something chatgpt gave me), because this would not be practicle when selling an application.
 
Please show us the code that doesn't work, then. It sounds like you are setting the control source at runtime.
 
nothing, i got this db from ********, may be the load event is not the correct place. With the ie11 control i always first loaded a blank page..
 
Last edited by a moderator:
nothing, i got this db from *****, may be the load event is not the correct place. With the ie11 control i always first loaded a blank page..
Okay.

In both M365 Access 32 bit and 64 bit, the local html pages load without the leading = in the controlsource, so I wondered if that was a factor in your problem.

Regarding the code, have you inserted a break point and walked it to see if that shows you something useful in diagnosing the problem?
 
Last edited by a moderator:
Okay.

In both M365 Access 32 bit and 64 bit, the local html pages load without the leading = in the controlsource, so I wondered if that was a factor in your problem.

Regarding the code, have you inserted a break point and walked it to see if that shows you something useful in diagnosing the problem?

Private Sub LoadFile()
Dim fullPath As String
If Not IsNull(Me.txtFile) And Len(Me.txtFile) > 0 Then
fullPath = Me.txtFile
If Left(fullPath, 1) <> "=" Then
fullPath = "=""" & fullPath & """"
End If
Me.EdgeBrowser0.ControlSource = fullPath
Debug.Print "Navigating to: " & fullPath
End If
End Sub
 
Due to a legal and Ofcom threat from a certain individual, I am closing this thread and removing all reference to their name, and any other name I deem appropriate.
 
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

Back
Top Bottom