Mediaplayer object on form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please help! I have a mediaplayer activex on a form. In order to keep with
the layout and design, I would like to be able to hide it, and just add a
couple of buttons to stop and start the file the user selects from a list.
Every time the user updates the list I've got the following:

DoCmd.Requery "picked"
Me!WindowsMediaPlayer1.URL = Replace(DLookup("[Path] ", "[tblTracks]",
"[tblTracks]![Counter] =[lister]"), "#", "")
Me!WindowsMediaPlayer1.settings.autoStart = false

which works fine. However, the "play" button on the form has the following:

Me!WindowsMediaPlayer1.Controls.play

and every time I try to press it, I get the error message "Object does not
support this property or method".

It is driving me absolutely insane! Any help would really be very
appreciated (by me).
 
Alex,

There's not much I can offer by way of return, except...
Thank You! Thank You! Thank You! Thank You! Thank You!

Alex Dybenko said:
Hi,
try to write like this:

Me!WindowsMediaPlayer1.Object.Controls.play

with Me!WindowsMediaPlayer1 you refer to control, containing activex object,
and to refer to object right syntax is Me!WindowsMediaPlayer1.Object

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


Simon Gutteridge said:
Please help! I have a mediaplayer activex on a form. In order to keep with
the layout and design, I would like to be able to hide it, and just add a
couple of buttons to stop and start the file the user selects from a list.
Every time the user updates the list I've got the following:

DoCmd.Requery "picked"
Me!WindowsMediaPlayer1.URL = Replace(DLookup("[Path] ", "[tblTracks]",
"[tblTracks]![Counter] =[lister]"), "#", "")
Me!WindowsMediaPlayer1.settings.autoStart = false

which works fine. However, the "play" button on the form has the
following:

Me!WindowsMediaPlayer1.Controls.play

and every time I try to press it, I get the error message "Object does not
support this property or method".

It is driving me absolutely insane! Any help would really be very
appreciated (by me).
 
Back
Top