Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Webrowser code not working

Status
Not open for further replies.

rudolfelizabeth

Programmer
Jan 14, 2009
89
CW
Hi

I have on a form with a video list name list(1)
and a webbrowser video page on the same page
access 2016
when I insert the code "=C:\users\owner\Desktop\mainfolder\access\Meditation" on the webbrower page
I can see all the vidoes and click on them and play them

When I use the code in the afterupdate field to to show the video from the video list with me.webbrowser =
"=C:\users\owner\Desktop\mainfolder\access\Meditation = List1.Column(2)" so I can get the only see the chosen video

The code is not working

I also tried the option windowsplayer4 in ms access 2016 with the xtrieve function in another form it keeps retrieving the video but doesn't play the video.
Another problem I have is with ms access 2007-2016 when entering code in the event procedure the code characters turns red instead of blue preventing the popup window to popup how do I solve this problem

your Help will be highly appreciated







 
 https://files.engineering.com/getfile.aspx?folder=42064a75-bb24-4cc2-aaa7-74582a1bec6d&file=ScreenHunter_29.png
Did you try:

Code:
me.webbrowser[blue].ControlSource[/blue] = "C:\users\owner\Desktop\mainfolder\access\Meditation\[blue]" & [/blue]List1.Column(2)

Hint taken from this place

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
You need to set value in the form [tt]="address"[/tt], so
[tt]me.webbrowser.ControlSource = "=" & """C:\users\owner\Desktop\mainfolder\access\Meditation\" & List1.Column(2) & """[/tt]

combo
 
What error message? Test, what you pass using [tt]List1.Column(2)[/tt] first. You have to build valid path and file name, an extension may be required.

combo
 
Hi,
The pathname is in the table field column 2 of the dropdown list my friend that is logic everybody knows that
 
The Video_Link is invalid, why not store full address here and use it to build ControlSource string?

You need to create string [tt]="C:\users\owner\Desktop\mainfolder\access\Meditation\Meditation_1.mp4"[/tt].
In your initial code, with Andy's correction:
[tt]strMediaRef = "=" & """C:\users\owner\Desktop\mainfolder\access\Meditation\" & List1.Column(2) & ".mp4" & """
Me.webbrowser.ControlSource = strMediaRef[/tt]

For debugging, check if the file address is proper, for instance:
[tt]strMediaRef = ... ' build the string
MsgBox strMediaRef ' verify
Me.webbrowser.ControlSource = strMediaRef ' execute[/tt]

combo
 
Hi combo (technical user)

What you're suggesting is that the dropdown list in ms access 2016 isn't link with the webbrowser in the same form so it doesn't work of course if you include all the codes in code builder than you don't need the dropdown list anymore, but that is not what I'am asking I am asking does the dropdown list in access work with the webbrowser are not because some people are pretending that it is working it is not working
 
It is not my suggestion at all. Before writing my first answer, I've tested setting webbrowser's ControlSource by VBA code. It worked, but it requires:
- string with proper path & file name,
- proper prefix (=") and suffix (") added to address,
- VBA code that sets ControlSource string and a trigger activating it.

The images indicate that you do not store valid addresses. You try to pass address without surrounding it with ="...". This is why "next file is the file with the playlist screen output with your code but doesn't play the video". I repeat again: check what string you try to pass to webbrowser, copy it to webbrowser for testing. If, in opposite to code it will work, check the code flow.


combo
 
Thanks for your effort I've solved the problem"

Huh! After all the exchanges, and you simply say, "thanks," "solved," without a hint of what your solution is?

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top