Good Evening. I have a form with a command button named play. onlcick the following Macro named Macro1 runs

Private Sub Command0_Click()
On Error GoTo Err_Command0_Click

Dim stDocName As String

stDocName = "Macro1"
DoCmd****nMacro stDocName

Exit Sub

MsgBox Err.Description
Resume Exit_Command0_Click

End Sub

In turn the following module is triggered

Option Compare Database
Option Explicit

Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" ( _
ByVal lpszName As String, _
ByVal hModule As Long, _
ByVal dwFlags As Long) As Long

Function PlayWav()

'Change the file path of the wav file as needed.
Call PlaySound("g:\My Music\rossini.wav", 0&, &H1 Or &H20000)

End Function

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.

Thank you all in anticipation