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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX control Filename in Microsoft Access

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

My problem involves the ActiveX control in a Microsoft Access form.

The Activex control I using is the Windows Media Player.
I'm using it to play mp3 files.
However, I would like the ActiveX control be able to play different mp3s for different record the form is displaying.

In other words, the Activex control will play song A, when the form is displaying the record for song A. The activex control will play song B, when the form is displaying the record for song B.

I tried to use an identifier inside the "Filename" of the ActiveX control property sheet: [Tables]![MP3]![MP3Hyperlink]
where [MP3] represents the table in which I store all the mp3 file links [MP3Hyperlink] as data.
But it cannot work.

Does anyone have a solution to my problem?
Please help me.
THank you!
 
Even in tables are stored objects, they are only objects data, not using interface. You should create a new "Windows Media Player" or to put such control in a form and set the data source the table row, or to load data in the creaetd new object. At the same last you can play it. Ion Filipski
1c.bmp


filipski@excite.com
 
To Ion Filipski,

First of all, thanks for the reply. But I am not sure of certain points you've brought and need a bit more details.

(1)How do I create a new "Windows Media Player"? (Doesn't putting the ActiveX control on the form create a new control?)

(2)How do I set the data source of the new "Window Media Player" as table row? What is meant by a "table row"? Is there a need to write an event procedure? (I do not really know Visual Basic)

Hope to see your response soon,
Thank you!
 
1.
dim player as object
set player = CreateObject("MediaPlayer.MediaPlayer")
player.filename = xxxx...
player.play
player
2. table:
ID object
1 song1
2 song2
3 song3
when you put some control in a form you can set the row source in properties. After that, execute what do you want: play; pause; stop.... The row source is what Media Player will execute(remember, even for example song1 is an object, it can do nothing, because it is not a program, but Media Player is a program which can load object and do something with it). Ion Filipski
1c.bmp


filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top