473,386 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Play a ".Wav" sound with Access

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
7 4975
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
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
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
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
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
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
Thanks again Arno for your help

Tempy

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bill Dandreta | last post by:
I posted a message ("Help with my 1st Tkinter program") a few days ago complaining that Python did not have any built in basic cross platform sound capability. I was wrong (at least partly). Python...
2
by: | last post by:
Hi everybody. Need your help. How can I play sound (.wav-file / camera click) on mouseclick? TIA willy wuff ...
1
by: svpsiva | last post by:
How to play sound in j2sdk1.4.2_07??
0
by: yuen | last post by:
How to play sound by C# without using WMP?
0
by: seo gang ho | last post by:
this is my source :$ (tone generator) how to play sound in outputbuffer? please help me...teach me detail...:$ using System;
1
by: Lam | last post by:
how can I play sound file in a .aspx page written in C#? I try to use the code like the following. But whenI call the play function play("sound.wav", this.SND_ASYNC) my computer give out "be"...
10
by: CM | last post by:
Hi, I used to use the following code to play sound in VB6: Public Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags As...
1
by: tinmaung | last post by:
hi please help me i want to know how to play sound in java application i don't mean java applet if you can, please send me how to write coding to play sound in application.
1
by: anuvanand1 | last post by:
I am in need of user defined function for Play sound .........
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.