Using a WAV File in an Access Database

Anything not covered in other boards, software, tricks, tweaks, help etc please post in here.
1 post Page 1 of 1
Contributors
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 444
Joined: Tue Feb 16, 2010 6:24 am

In access VBA can be used on Access Forms. To keep this handy this simple little code is used to load .WAV File to play with some of the functions or controls.

Simply this code will work with files found in the "Project Path." Paste the .WAV file that you would like to play in the fold, and simply modify file the code below:
Dim Path_Value As Long
Path_Value = sndPlaySound(CurrentProject.Path & "\WAV FILE.wav", SND_ASYNC)
As you see add the WAV file name where "WAV FILE.wav" is. Then take this and paste it in the control that you want to play this sound.
Image
1 post Page 1 of 1
Return to “Misc”