G
Guest
I'd like to make a command button in a form that when pressed plays a sound
associated with the record.
Is this possible?
associated with the record.
Is this possible?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Lori said:I'd like to make a command button in a form that when pressed plays a sound
associated with the record.
Not sure where in this code to indicate the location of the wav file. I
tried the bottom, where I noticed the chimes sound file had been inserted,
but since I'm not a code writer I'm not quite sure what I'm looking at. Also
don't know what version of access this code is compatible with. I created a
command button, added the code to the on click event.
Marshall Barton said:Create a new standard module and Copy/Paste the code in the
article into the module. Compile the module to make sure
it's correct.
The code for your command button would be similar to the
lines in the faTest function or even just one line like:
fPlayStuff "C:\Program Files\Windows NT\Pinball\SOUND17.WAV"
--
Marsh
MVP [MS Access]
Lori said:Not sure where in this code to indicate the location of the wav file. I
tried the bottom, where I noticed the chimes sound file had been inserted,
but since I'm not a code writer I'm not quite sure what I'm looking at. Also
don't know what version of access this code is compatible with. I created a
command button, added the code to the on click event.
Thank you. I can get the sound to play now. But I want to assign a new
sound per record that is displayed on the form. Each record will have its
own unique picture and sound. The picture part is easy, but how can I make
the command look to the individual record and plug in the appropriate sound
file?
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.