From My Files ---
(See below my SIG)
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
Play A Sound In Any Event
To play a sound in any event, just set an event such as a form's OnOpen to:
=PlaySound("C:\WINDOWS\CHIMES.WAV")
Paste the following declaration and function into a module and save:
Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" _
(ByVal filename As String, ByVal snd_async As Long) As Long
Function PlaySound(sWavFile As String)
' Purpose: Plays a sound.
' Argument: the full path and file name.
If apisndPlaySound(sWavFile, 1) = 0 Then
MsgBox "The Sound Did Not Play!"
End If