×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Webrowser code not working

Webrowser code not working

Webrowser code not working

(OP)
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







RE: Webrowser code not working

Did you try:

CODE

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

Hint taken from this place

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Webrowser code not working

(OP)
Andrzejek tried that already doesn't work

RE: Webrowser code not working

You need to set value in the form ="address", so
me.webbrowser.ControlSource = "=" & """C:\users\owner\Desktop\mainfolder\access\Meditation\" & List1.Column(2) & """

combo

RE: Webrowser code not working

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

combo

RE: Webrowser code not working

(OP)
Hi,
The pathname is in the table field column 2 of the dropdown list my friend that is logic everybody knows that

RE: Webrowser code not working

The Video_Link is invalid, why not store full address here and use it to build ControlSource string?

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


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

combo

RE: Webrowser code not working

(OP)
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

RE: Webrowser code 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

RE: Webrowser code not working

(OP)
Hi everbody,

Thanks for your effort I've solved the problem

RE: Webrowser code not working

"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,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close