By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,530 Members | 880 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,530 IT Pros & Developers. It's quick & easy.

Play a ".Wav" sound with Access

P: n/a
Good day, could you tell me if this possible and if so please could you
help me with the code?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Google is your friend.
http://www.mvps.org/access/api/api0011.htm

Arno R

"Tempy" <an*******@devdex.com> schreef in bericht news:IY****************@news.uswest.net...
Good day, could you tell me if this possible and if so please could you
help me with the code?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***

Nov 13 '05 #2

P: n/a
Hi Arno, as a newbie i think for now this is outa reach for me.
Thanks for the site.

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3

P: n/a
Try to copy the following code in a new module and save the module as e.g. modWave
Call the function like shown in the line Example.

<start code here>
Option Compare Database
Option Explicit

Private Declare Function apiPlaySound Lib "Winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Function csvPlayWave(ByVal FileName As String, ByVal How As Integer) As Integer
csvPlayWave = apiPlaySound(Trim(FileName), How)

'Example:
'Dim Retkode as integer
'Retkode =csvPlayWave("c:\windows\media\tada.wav", 1)

End Function
<end code here>

Arno R

"Tempy" <an*******@devdex.com> schreef in bericht news:_I****************@news.uswest.net...
Hi Arno, as a newbie i think for now this is outa reach for me.
Thanks for the site.

Tempy

*** Sent via Developersdex http://www.developersdex.com ***

Nov 13 '05 #4

P: n/a
Thank you so much Arno, you guys are really an insperation and great
help

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #5

P: n/a
Sorry Arno, one last question; is it possible to store the wav file
within the database ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #6

P: n/a
Hi Tempy,
I am not sure what you want to store... I presume it's the path to the wav ??
If so, yes you can of course.
If you are trying to embed the wav in the mdb, I would *not* advise to do so.
If you need the wav with your app, I would place the wav in the PathToMdb-directory (or the PathToBackend) and use code when the file is needed.

Arno R

"Tempy" <an*******@devdex.com> schreef in bericht news:6k**************@news.uswest.net...
Sorry Arno, one last question; is it possible to store the wav file
within the database ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***

Nov 13 '05 #7

P: n/a
Thanks again Arno for your help

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.