Sounds to a Command Button

  • Thread starter Scott and Penny Heeren
  • Start date
S

Scott and Penny Heeren

I am trying to set a sound to a Command Button. The button is a delete
button that deletes a records. I want to assigned a flush sound. I gave it
a hyperlink address to go to when it clicks. Access then comes up and gives
me a Hyperlink warning then I have to click yes and it plays the sound. How
do I get rid of the WARNING?
 
F

fredg

I am trying to set a sound to a Command Button. The button is a delete
button that deletes a records. I want to assigned a flush sound. I gave it
a hyperlink address to go to when it clicks. Access then comes up and gives
me a Hyperlink warning then I have to click yes and it plays the sound. How
do I get rid of the WARNING?

The following worked for me without any warning message:

Application.FollowHyperlink "C:\FolderName\YourFlushSound.wav"
' Balance of event here...
 
R

Rob Parker

See http://www.mvps.org/access/api/api0011.htm for a method of playing .wav,
..avi, and .mid files

Copy the code there to a module in your database, then simply add the line
Call fPlayStuff("pathto\myfile.wav", mode)
(where mode is a constant - see the comments in the code) to your button's
click event.

HTH,

Rob
 

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