play sound (wav) on action

D

Daniel

Hello,

Is there a simple way to verify is a windows system wav is installed on
a computer and play the said wav when a form is opened?!

This is what I am looking to do but I don't know what code or libraries I
need to utilize:

if c:\windows\media\tada.wav exist then
play c:\windows\media\tada.wav
end if

Thanks,

Daniel
 
M

Marshall Barton

Daniel said:
Is there a simple way to verify is a windows system wav is installed on
a computer and play the said wav when a form is opened?!

This is what I am looking to do but I don't know what code or libraries I
need to utilize:

if c:\windows\media\tada.wav exist then
play c:\windows\media\tada.wav
end if


Use the Dir function to check if a file exists.

You can use the code at
http://www.mvps.org/access/api/api0011.htm
to play a .wav file.

If DIr("c:\windows\media\tada.wav") <> "" Then
fPlayStuff("c:\windows\media\tada.wav")
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top