From my files ---
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com 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
End Function
"NB" <ni******@lycos.com> wrote in message
news:5c**************************@posting.google.c om...
I've done a thorough search, but could not find any posts
If I store a sound file within the mdb, How do I play it (in a form
event, for example)
I can save it to a temp folder and call the Windows API to play it.
But that doesn't look very clean.
I guess there must be a way to directly play that sound without first
extracting it.
Anyone have some solution?
Thks
NB