Page 1 of 1

Using a WAV File in an Access Database

Posted: Wed Nov 05, 2014 3:40 am
by Livengood
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.