Video & Audio via Access Form (1 Viewer)

gstylianou

Registered User.
Local time
Today, 13:29
Joined
Dec 16, 2013
Messages
357
Music via Access

Dear friends hello and Hppy New Year 2018

I'm trying to find a way so that the embeded media player which is included into frmWMV to change to the next song tarck or video ... Because of my poor knowlege to vba i cannot finding a way ...

I would like your help..

(in order to check my attached example please copy the database on C: \)
 

Attachments

  • AccPlayer.mdb
    328 KB · Views: 141

isladogs

MVP / VIP
Local time
Today, 11:29
Joined
Jan 14, 2017
Messages
18,211
Hi

You have uploaded an MDB file so I'm guessing you are using an older version of Access / Windows

When I opened it, there is a missing reference for Windows Media Player (wmp.dll) which I believe is no longer supplied with Windows.

Sorry but I am unable to assist you.

however, if my memory is correct there is an example database of the same thing somewhere on this site. Do a site search?
 

1268

Registered User.
Local time
Today, 05:29
Joined
Oct 11, 2012
Messages
44
ht

tp://p2p.wrox.com/access-vba/5637 0-creating-media-player-1 1-object-access-vba.html

Try searching media player vba automation.


Sent from my SM-G950U using Tapatalk
 

gstylianou

Registered User.
Local time
Today, 13:29
Joined
Dec 16, 2013
Messages
357
Hi

You have uploaded an MDB file so I'm guessing you are using an older version of Access / Windows

When I opened it, there is a missing reference for Windows Media Player (wmp.dll) which I believe is no longer supplied with Windows.

Sorry but I am unable to assist you.

however, if my memory is correct there is an example database of the same thing somewhere on this site. Do a site search?

Dear friend ridders,

Find attached the correct database (.accdb). Please extract the zip file on C:\ and put some audio files into Media Files folder inside the Mp3 subfolder, moreover as some video files into an Mp4 subfolder...Then, you can select the media files from the main form....and lets see if we can do something..

Thanks again
 

Attachments

  • Juke Box Database.zip
    56.3 KB · Views: 143

isladogs

MVP / VIP
Local time
Today, 11:29
Joined
Jan 14, 2017
Messages
18,211
Thanks for the accdb version but I still have the same issue in Windows 10.
The required VBA reference library wmp.dll isn't on my computer
 

gstylianou

Registered User.
Local time
Today, 13:29
Joined
Dec 16, 2013
Messages
357
Capture.JPG
Thanks for the accdb version but I still have the same issue in Windows 10.
The required VBA reference library wmp.dll isn't on my computer

Its strainge because i'm using also Win10 and office 2016 32Bits....sorry i cannot help....
 

gstylianou

Registered User.
Local time
Today, 13:29
Joined
Dec 16, 2013
Messages
357
Thanks for the accdb version but I still have the same issue in Windows 10.
The required VBA reference library wmp.dll isn't on my computer

Try this On-Load event of the form
The line below is only required if you actually set Access to have Reference to the Window Media Player within VBA References. This gives you access to the wmp.dll

Set wmp1 = CreateObject("WMPlayer.OCX.7")
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:29
Joined
May 7, 2009
Messages
19,230
here is your Jukebox.
check the code behind the
player form.
 

Attachments

  • Juke Box Database.zip
    48.8 KB · Views: 148

gstylianou

Registered User.
Local time
Today, 13:29
Joined
Dec 16, 2013
Messages
357
here is your Jukebox.
check the code behind the
player form.

My friend ... I have no words .. !! Thank you very much for your help .. I will study your code and if there is a problem or I need anything i will come back again to ask for help.!!

Thanks again..
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:29
Joined
May 7, 2009
Messages
19,230
Comeback anytime.
 

gstylianou

Registered User.
Local time
Today, 13:29
Joined
Dec 16, 2013
Messages
357
Comeback anytime.

Good morning to everyone,

I do not know if what I ask after the valuable help I got from arnelgp is a game or something quite complicated .. !!

After the help from arnelgp we managed and the windows media player can now recognize the next song or video track and work wonderfully (again thanks my friend arnelgp for solution).

However, the ideal is when the song changes the list box which is appear on the left side of the form, can be able to change to the correct track name..!

I do not know if this can be feasible..and i'm asking your help again..!!

Note: If the above issue can not be feasible, i dont have any problem if we can do the same thing into a new Field on the form..!

Thanks again..!!
 

moke123

AWF VIP
Local time
Today, 06:29
Joined
Jan 11, 2013
Messages
3,913
if I may, can I suggest a small edit. I notice in the on unload event of your form frmMovies you have

Code:
Private Sub Form_Unload(Cancel As Integer)

        Forms!frmWMP.cmdRefresh_Click
     
End Sub

If you open frmMovies by itself you cannot close this form or exit the database.

I would suggest you test for the frmWMP loaded state before executing the code. Not a big deal but awfully annoying.

Code:
Private Sub Form_Unload(Cancel As Integer)

    If CurrentProject.AllForms("frmWMP").IsLoaded Then
        Forms!frmWMP.cmdRefresh_Click
    End If
    
End Sub
 

gstylianou

Registered User.
Local time
Today, 13:29
Joined
Dec 16, 2013
Messages
357
if I may, can I suggest a small edit. I notice in the on unload event of your form frmMovies you have

Code:
Private Sub Form_Unload(Cancel As Integer)

        Forms!frmWMP.cmdRefresh_Click
     
End Sub

If you open frmMovies by itself you cannot close this form or exit the database.

I would suggest you test for the frmWMP loaded state before executing the code. Not a big deal but awfully annoying.

Code:
Private Sub Form_Unload(Cancel As Integer)

    If CurrentProject.AllForms("frmWMP").IsLoaded Then
        Forms!frmWMP.cmdRefresh_Click
    End If
    
End Sub


Dear friend moke123,

You are absolutely right in what you are referring to, I changed the code by putting your code line and it works wonderfully ..
Thank you very much..!
 

isladogs

MVP / VIP
Local time
Today, 11:29
Joined
Jan 14, 2017
Messages
18,211
Just to say that, as suggested, I did try this the other day:

Code:
Set wmp1 = CreateObject("WMPlayer.OCX.7")

It didn't solve the problem of the missing reference so I couldn't open arnel's version either.
I removed the reference and then got repeated 'User Type not defined' errors at which point I lost interest...!

Not a problem as I don't need this myself but odd that nobody else seems to have the same issue
 

gstylianou

Registered User.
Local time
Today, 13:29
Joined
Dec 16, 2013
Messages
357
Just to say that, as suggested, I did try this the other day:

Code:
Set wmp1 = CreateObject("WMPlayer.OCX.7")

It didn't solve the problem of the missing reference so I couldn't open arnel's version either.
I removed the reference and then got repeated 'User Type not defined' errors at which point I lost interest...!

Not a problem as I don't need this myself but odd that nobody else seems to have the same issue

Ridders,

What is your office versnion?
 

isladogs

MVP / VIP
Local time
Today, 11:29
Joined
Jan 14, 2017
Messages
18,211
I tried it in both Access 2010 & Access 2016 with Windows 10 Pro
 

isladogs

MVP / VIP
Local time
Today, 11:29
Joined
Jan 14, 2017
Messages
18,211
I believe Windows Media Player was removed from Windows 10.
I don't have it on my PC and its not an optional feature I can add

UPDATE:
That's odd. My laptop runs Windows 10 Home & does have Media Player
I can load the app without error on the laptop.
Had a bit of trouble loading an MP3 file (possibly as I can't read Greek) but its now playing perfectly

Now I'm intrigued and will investigate further ....
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 11:29
Joined
Jan 14, 2017
Messages
18,211
After some research about why Media Player was missing on my desktop PC, I found the following info at
https://betanews.com/2017/10/09/windows-10-update-removes-windows-media-player/

In case its useful to anyone else, here are the relevant parts of that article

The feature's removal came to light when users installed KB4046355 on devices running Windows 10 version 1709 -- the Fall Creators Update.

This update, referred to as FeatureOnDemandMediaPlayer, removes Windows Media Player from the OS, although it doesn’t kill access to it entirely.

If you want the media player back you can install it via the Add a Feature setting. Open Settings, go to Apps > Apps & Features, and click on Manage optional features.

Select Add a feature and then scroll down to the Windows Media Player entry and click on Install.

Whilst its old technology, it does still have its uses & I now have it back again.

Oddly the same update didn't remove WMP from my Windows laptop or tablet
 

gstylianou

Registered User.
Local time
Today, 13:29
Joined
Dec 16, 2013
Messages
357
Dear friends,

I'm here again because of another one serious issue. After the modification of the vba code (by arneg) in order the player to change automatically the next track, now i cannot add new song and i god the attached message... Please note that, the selected URL can store normally into a table but cannot be visible into MoveList..

Please your help again...!!
 

Users who are viewing this thread

Top Bottom