Play an Audio File with MS Access
Posted on 2013-01-15
I used the following code (obtained here yesterday):
'This function declaration must be entered onto a single line.
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
If Application.CanPlaySounds Then
'Substitute the path and filename of the sound you want to play
Call sndPlaySound32("c:\track2.wav", 0)
It works, in that it sets off a sound, but it appears to be the default system "Beep" instead of the specific wav file that I want to play. I appreciate your assistance.