Working with windows media player in access

  • Thread starter Thread starter TOMAC
  • Start date Start date
T

TOMAC

I have added a Windows Media Player activex control in an MS Access form and
I want to play a video file when I click on an command button. The file to be
played is that of the content of a field on that form. For example, if field
A contains the text c:\test video1.iso and I click the command button, then
play video c:\test video1.iso. If this value changes to another vodeo file
name, then play that file.

I can't find how to set the URL of the windows media activex control to read
a field on a form. Is there a way to do this? Thanks in advance.
 
I have added a Windows Media Player activex control in an MS Access form and
I want to play a video file when I click on an command button. The file to be
played is that of the content of a field on that form. For example, if field
A contains the text c:\test video1.iso and I click the command button, then
play video c:\test video1.iso. If this value changes to another vodeo file
name, then play that file.

I can't find how to set the URL of the windows media activex control to read
a field on a form. Is there a way to do this? Thanks in advance.

Why not shell the video in another process, using Shell ("c:
\whatever_path\wmplayer.exe c:\myvideo.wmv")? I haven't seen anyone
try to embed Media Player before I have premonitions of application
crash all over the place.

If you're certain you want to embed the control, you'll need to attach
some code to your command button to set the video played in the
ActiveX control. It won't be able to link to the textbox control
directly since Media Player doesn't know about Access.

-- James
 
Back
Top