Subform with WebBrowser needs some navigation

Rknight

New member
Local time
Today, 02:59
Joined
Mar 26, 2018
Messages
7
Greetings all!! Hopefully someone can guide me in solving this.

I am using Access 2016. In the main form I have a text box that passes a contract number to a query. That query fills the data for the subform and is the control source for the WebBrowser (internal shared drive hyperlink). The webbrowser control displays the intended shared folders just fine and you can navigate down in the folders (very important). This folder location can not be static as it will change with contract number. See screen shot. Sadly I can not share the database for various reasons.

So the question is (if all this made sense) is there a way to put a "back" button on this webbrowser? Is there a better way to browse for shared server folders and files?

Also, I have tried a button like a requery..didn't work..tried opening the same folder location..works only if it opens in new window, does not work with target being the webbrowser control.

Thanks!
 

Attachments

  • question.jpg
    question.jpg
    95.8 KB · Views: 158
There is a goback and goforward method on webbrowswer.object
 
I tried that as well. I got "method not found."

I'm not navigating to a web page but a server folder. Not sure if that makes a difference.
 
You add .Object to the control

Webbrowser1.object.goback
 
Sorry to sound dense but please explain a little further.

Am I putting this on a button? Or the event in the properties of the webBrowser?

Again sorry for needing to the lead but this problem has beat me up for a few days.
 
add a command button just above the webcontrol.
you may use icon (back icon).
you may also use button for back and forward.

on the click event of back button:

private sub yourBackButton_Click()
on error resume next
yourWebControlName.Object.GoBack
end sub


on the click event of "forward" button:

private sub yourForwardButton_Click()
on error resume next
yourWebControlName.Object.GoForward
end sub


''''
replace yourWebControlName with the the name of
your web browser control name.
 
That query ... is the control source for the WebBrowser

I don't think so. The web browser doesn't have a control source.

You either point it at an existing html file or generate the dom document on the fly.

If the page is generated by code in your database a 'back' button is unlikely to work.

search your code for things like "innerhtml" and "beforenavigate".
 
Worth pointing out that there are two web browser controls.
The standard one and an ActiveX version.

The standard web browser does have a control source property.
Which is the OP using?

For my own purposes, does anyone know how to open explorer in details view in a web browser control (of either type). It always opens with icons but detail view heading as in screenshot in post 1
 
Worked great!!

I have a flat spot on my head where I was beating it on the wall.:banghead:
 

Users who are viewing this thread

Back
Top Bottom