Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" ( _
ByVal lpszName As String, _
ByVal hModule As Long, _
ByVal dwFlags As Long) As Long
'Change the file path of the wav file as needed.
Call PlaySound("g:\My Music\rossini.wav", 0&, &H1 Or &H20000)
This command button works fine. What I am trying to do is insert another command button that will stop the wav file plying. At the moment it continues playing until the the end of the file even if the form holding the macro is closed. It does stop if the database is closed.
I would also like the wav title(e.g. in the above "rossini" to be taken from the text field titled "Tune"
I am a complete novice at datbase construction and as such would appreciate any help with an explaination of how i could solve the above two problems.