Playing Video w/ Media Player

echorley

Registered User.
Local time
Today, 09:26
Joined
Mar 11, 2003
Messages
131
Thanks to some great posts, I have coded a form that finds displays the location of a file on my hard drive. The text box displays the path and the filename (For example: c:\My Documents\My Videos\video.mpg is displayed in the text box)

Now, I have added Windows Medial Player onto the same form.

How can I then get Media Player to play the file that is listed in the text box?. I have tried "messing" with the URL in the Windows Media Player properties menu, but to no avail!

Thanks
 
Attach the following code to a command button:


Me.MediaPlayerName.filename = Me.TextBoxName

You will need the full address of the file.

With the media players "AuotStart" property set to yes, your movie will start.

HTH

Brad.
 
I have tried that

Thanks for your reply. I did see your earlier post and tried that exact procedure. Here is the code:

Private Sub Command5_Click()

Me.Media_Player.Filename = Me.Text36

End Sub

Windows Media Player is named "Media Player" and the text box (Text36) has the entire path (including the filename).

When I tried this I get the following error:

Run-time error '438'
Object does not support this property or method.

When I wrote the code above, the "Filename" term did not popup like other terms usually do. I wonder if that is the problem? Or is it because the version of Windows Media Player I have is older? I run Media Player 9 on my desktop, but it seems that Media Player 7 is the Active X object that is in my form.

Thanks!
 
Strip off the rest of the database, then zip and post the form.

No need to include the media files, I will re-link to something at my end.

I will have a look at your setup and test it on earlier media player versions.

Brad.
 
I got it!

Instead of .filename, it is .url. That has done it. Another question though. The only version of Windows Media Player that seems to be availiable in Access is 7.0. How do you get 9.0 (latest version) to be an Active X option?
 

Users who are viewing this thread

Back
Top Bottom