Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Play Sound > < SQL with Access | AutoNumbers Not For You >
Play Sound
By Richard Rost   Richard Rost on LinkedIn Email Richard Rost   4 years ago

How to Make a Beep or Play a Sound in Access


 S  M  L  XL  FS  |  Slo  Reg  Fast  2x  |  Bookmark Join Now

In this video, I will show you how to make Microsoft Access sound a beep. More importantly, I'll show you how to make a series of beeps, so whether you need 2, 3, 4, or more beeps, I've got you covered. We'll use a For/Next loop in VBA plus a little sleep timer for a delay.

David from Cedar Rapids, Iowa (a Platinum Member) asks: I have a very long report that I run every morning. It takes a good 5 to 10 minutes. When it's finished, I'd love for the database to make some kind of noise to let me know it's ready. I played around with the Beep function, and it works OK, but it's easy to miss one beep. If I try to get it to play like 10 times in a row, it still just sounds like one beep. Any ideas?

Members

Members will learn how to actually play a real WAV sound file in VBA, so the sky is the limit as far as the sounds you can hear from your databases. You can play Star Trek sounds... all... day... long... :)

Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the files from class plus get access to the Code Vault. If you're not a member, Join Today!

Links

Suggested Course

Learn More

FREE Access Beginner Level 1
FREE Access Quick Start in 30 Minutes
Access Level 2 for just $1

Free Templates

TechHelp Free Templates
Blank Template
Contact Management
Order Entry & Invoicing
More Access Templates

Resources

Diamond Sponsors - Information on our Sponsors
Mailing List - Get emails when new videos released
Consulting - Need help with your database
Tip Jar - Your tips are graciously accepted
Merch Store - Get your swag here!

Questions?

Please feel free to post your questions or comments below or post them in the Forums.

Keywords

microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, beep, sound, wav file, mp3, play sound, beep macro action, beeping sound, How to play sound in Access, How do you add audio to Access, Play Sound on Your Microsoft Access Forms

 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to Play Sound
Get notifications when this page is updated
 
Intro In this video, I will show you how to play a sound in Microsoft Access using VBA, specifically focusing on adding audible notifications when long-running reports or processes are finished. We will cover using the beep function, discuss why multiple beeps may run together, and I'll demonstrate how to use a sleep timer and a for-next loop to play multiple beeps with pauses in between. This will help you create effective alerts in your Access databases for completed tasks or reports.
Transcript Welcome to another TechHelp video brought to you by AccessLearningZone.com. I'm your instructor, Richard Rost. In today's video, I'm going to show you how to play a sound in Microsoft Access.

Today's question comes from David in Cedar Rapids, Iowa, one of my platinum members. David says, "I have a very long report that I run every morning. It takes a good five or ten minutes. When it's finished, I'd love for the database to make some kind of a noise to let me know it's ready. I played around with the beep function and it works okay, but it's easy to miss one beep. If I try to get it to play like ten times in a row, it still just sounds like one beep. Any ideas?"

Well, yes, David. I too have several reports and very long queries or series of things that I run from time to time. When it's done, it's nice to have the system alert you in case your attention is somewhere else. Yes, if you play with the beep function, which I'll show you in just a minute, if you stack them together, it doesn't matter. Without some kind of delay in there, it just sounds like one long beep. Let me show everyone else what we're talking about.

A couple of prerequisites before we get started. If you've never done any VBA before, go watch my Intro to VBA video. It's not scary. You'll be fine. Go watch my Intro to VBA. It's absolutely free, about 20 minutes long. It's on my website and on my YouTube channel. Go watch it. It doesn't hurt.

Once you've done that, go watch my video on for-next loops. We're going to use a little loop to play multiple beeps in a row. Instead of just typing beep, beep, beep, beep, beep, we'll do a little loop.

Here I am inside my TechHelp free template. This is a free download. You can grab a copy off my website. You'll find links down below the video in the description section. Let's pretend I've got some very long report that runs. I've got a bunch of queries that have to crunch numbers and do this and that.

I personally have reports that take about five or ten minutes to run because it's pulling data across the network for my server too. I'm going to take this Hello World button here. If you've watched my Intro to VBA, you know what this guy is all about. I'm just going to make this. Actually, we don't even need this guy here. I'm going to delete it. We'll just leave it there. But I'm going to go inside the Hello World button here. Let's change this guy to play a sound.

Right click, Build Event. That'll bring me right in here. Ignore all the rest of this stuff. Right down here is what I want. Now, if I just want to play one little beep, I can just type in beep. That's it. Beep. Technically, the command is DoCmd.Beep, but you don't really need DoCmd. You can just put beep in there. Save it and then come out here.

I'm going to reopen this form and then watch. Beep. It's whatever your default system Windows beep is, and that's something that you change at the Windows level. If you change your Windows sound themes, that will change, and you have no control over what the beep plays. It's just a default Windows beep.

Now, if you try to stack them together, if you go beep, beep, beep, beep, let's say I try to play four of them. Save that. If I click the button, it still just sounds like one beep. Why? Because Windows is basically playing those things at the same time. It just runs one into the other immediately. It doesn't play synchronously; it plays asynchronously. It doesn't wait for the previous one to finish, so it all sounds like they've stacked up on top of each other.

If you want to get around that, you can use a little sleep timer. Where do you get a sleep timer from? Welcome right here on my website. Go to 599cd.com/sleep. This will take you to my code vault, and this page is free for everybody. You'll see a Sleep Seconds right there. Some of the pages in the code vault are free. This is the only line you really need right there, that one line. See that? If you're a gold member, you can go in here and copy that. If you want to, everybody else, you have to type that right off the screen.

I'm going to copy that right there. Oh, get the whole thing. Public Declare Pointer. Save, sleep, that whole thing right there. That's all you need.

I'm going to copy that. I'm going to come back over here to Access, go to Create, click on Module, not a class module, regular module, and then just paste that line in. There it is.

Now we're going to save this. You call it whatever you want. I'll call it Global. I like to have usually one global module, and you'll see it right down over here. Now there's your global module. What's in there? Just that. But now you can use Sleep. Sleep is basically a neat little function where you can say Sleep and then give it a number of milliseconds. So 1000 is equal to 1 second.

Now let's go back over to the code in this button here. Design View. Right click, Build Event. Now I'm back in this Form Module. Now I can say Sleep 1000. So it's going to play that beep and then sleep for a second. Doesn't seem like a lot, but it makes a big difference. Then we'll copy that and then we'll paste it after that sleep, and then we'll paste it after that sleep.

Save it. Let's come back out here, close it, open it back up again. By the way, I've got a little button on my quick launch toolbar up here; you can just open up the main menu. Ready? Here we go. Play sound. Click. 1, 2, 3, 4. Now you hear them all. The sleep timer puts a nice little pause between the beeps so they don't all stack up on top of each other.

This isn't the best way to write this code. Let's get rid of that. Let's use a little loop. I said we're going to use a for-next loop. So we're going to Dim x as Long. Some variable x, I've got to call it x. That's fine. It's a long integer, a number. You can make it an integer if you want to, but I pretty much always stick with longs.

So, For x = 1 To, however many beeps you want, let's say 5. Then here I'll say beep and then sleep 1000. Then Next. And that's it. There's a nice little for loop. It'll loop 5 times. It'll beep and then sleep. Beep and sleep. Beep and sleep. Beep and sleep.

Ready? Let's save it. Come back out here. Let's just do that. Here we go. Click. Beep and sleep. Beep and sleep. Beep and sleep. That's it. There you go. There's five beeps.

Now, this thing here is the status box, and if you watched my blank template video, where I create this thing, I'll show you how to create a status function. Status just basically puts some stuff in the status box. We can come right here and say Status "The count is " & x, like that. Then when we run it, one, two, three. There you go.

David, that's how you can put a little pause between your beeps and have as many of them as you want.

Now if you really want to play with the cool kids, you'll learn how to play an actual sound file in your databases. That is something I will cover in the extended cut for the members. If you want to learn more in the extended cut for the members, I will teach you how to play an actual sound file, a WAV file, in your Access database. Maybe it's a little more code, but not too much though.

I'm sure some of you might have heard this in some of my different TechHelp videos because I have an hourly chime in my office that goes like this. That's a Beam Me Up sound. That's how I know my database is doing stuff. Every hour that plays.

Extended cut for members. Silver members and up get access to all of my extended cut videos. I'm pretty sure we're over 240 now. Gold members not only get the videos, but they can download these databases and they get access to the code vault, so they don't have to type stuff in off the screen.

How do you become a member? Click on the Join button below the video. After you click the Join button, you'll see a list of all the different membership levels that are available, each with its own special perks.

Silver members and up will get access to all of my extended cut TechHelp videos, one free beginner class each month, and more. Gold members get access to download all of the sample databases that I build in my TechHelp videos, plus my code vault where I keep tons of different functions that I use. You'll also get a higher priority if you decide to submit any TechHelp questions to me, and you'll get one free expert class each month after you've finished the beginner series.

Platinum members get all the previous perks, plus even higher priority for TechHelp questions, access to all of my full beginner courses for every subject, and one free developer class each month after you finish the expert classes. These are the full length courses found on my website, not just for Access. I also teach Word, Excel, Visual Basic, and lots more.

You can now become a diamond sponsor and have your name or company name listed on a sponsors page that will be shown in each video as long as you are a sponsor. You'll get a shout out in the video and a link to your website or product in the text below the video and on my website.

But don't worry, these free TechHelp videos are going to keep coming. As long as you keep watching them, I'll keep making more and they'll always be free.
Quiz Q1. What is the main reason David wants to play a sound after his report finishes in Microsoft Access?
A. To add entertainment to the report process
B. As an alert to let him know the process has finished
C. To test the system volume control
D. To keep the computer awake

Q2. What problem does David encounter when using the beep function repeatedly in succession?
A. The computer crashes after several beeps
B. The beeps are all silent after the first one
C. Multiple beeps sound like only one long beep
D. The function stops working after the first beep

Q3. Why do the beeps sound merged together when multiple beep commands are issued without delay?
A. The beep function only supports one tone per session
B. Windows plays them asynchronously without waiting for the previous beep to finish
C. Microsoft Access limits beep frequency
D. The sound card fails to process multiple commands

Q4. Which approach solves the problem of merged beeps in Microsoft Access VBA?
A. Using a faster computer
B. Updating the sound drivers
C. Inserting a sleep timer between beeps
D. Increasing the volume in Windows

Q5. Where can you find the Sleep timer code recommended in the video?
A. On the Microsoft Access official documentation
B. At the instructor's code vault via the given web link
C. In the Windows Sound settings
D. In the Access Options menu

Q6. Which VBA loop structure is suggested to play multiple beeps with pauses between them?
A. Do While loop
B. If-Else structure
C. For-Next loop
D. Select Case statement

Q7. What does the Sleep statement in VBA require as its argument?
A. The frequency of the beep in hertz
B. The time in milliseconds to pause
C. The number of times to loop
D. The type of sound to play

Q8. In the video, how can you change the default beep sound used by Access?
A. By rewriting the VBA code entirely
B. By changing Windows sound themes
C. By adding more hardware to your PC
D. By reinstalling Microsoft Access

Q9. What benefit does a "global module" provide when adding functions like Sleep to your database?
A. It keeps the VBA editor window open
B. It makes the code available throughout the database
C. It locks the database for editing
D. It improves the performance of reports

Q10. What additional tip is offered to members in the extended cut of the video?
A. How to reduce the noise in the office
B. How to play an actual WAV file in Access
C. How to print reports without sound
D. How to disable sounds altogether

Q11. Which membership level gives access to all extended cut videos and ability to download sample databases?
A. Silver
B. Platinum
C. Gold
D. Bronze

Q12. What is the role of the Status function as shown in the video?
A. It changes the Windows status bar color
B. It logs process activity to a text file
C. It updates a status box on the form with current progress
D. It sends emails to notify process completion

Answers: 1-B; 2-C; 3-B; 4-C; 5-B; 6-C; 7-B; 8-B; 9-B; 10-B; 11-C; 12-C

DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks.
Summary Today's video from Access Learning Zone covers how to play a sound in Microsoft Access. I received a question from a student who runs a lengthy report every morning. Since the process often takes five or ten minutes, he wanted the database to notify him with a distinct sound when the job is done. He had experimented with the simple beep function, but found it easy to miss a single beep. Even when he tried repeating it several times in quick succession, it still just sounded like one prolonged beep rather than a series.

This is a situation I understand well. I also have several long-running reports and queries that I use regularly, and it is very helpful to have the computer let me know when the process is complete. Using the default beep function in Access has its limitations. Without a pause between each beep, Windows just overlays the sounds, making it impossible to distinguish one from another. This all happens because the beep command is asynchronous. When you issue multiple beeps without any delay, they just blend together and sound like a single tone.

For those of you who are new to VBA, I recommend watching my Introduction to VBA video. It is free and takes about twenty minutes. It will help you get comfortable with writing and understanding VBA code in Access. Afterward, check out my lesson on for-next loops, because they provide a much better way to repeat actions, like multiple beeps, instead of writing out each beep individually.

Inside my free TechHelp template, which you can download from my website, I demonstrate the process by modifying a simple button. If you have seen my Intro to VBA video, you probably recognize the standard "Hello World" button. I modified it so that instead of doing its normal action, it will play a sound when clicked.

Using the beep command alone will play your system's default notification sound, which is determined by the current Windows sound theme. You do not control what the actual sound is through Access, so it is subject to your computer's Windows settings. If you try to enter the beep command multiple times in a row, you will notice that the beeps all run together, sounding just like one, since they play almost instantly without any delay in between.

To create a distinct series of beeps, you need to introduce a short pause between each one. This is where a sleep timer comes in handy. On my website, I offer a simple line of code that lets you pause VBA code execution for a specified number of milliseconds. For example, 1000 milliseconds equals one second. You just need to paste this declaration into a standard VBA module, which you can add from the Create menu in Access.

Once the sleep function is available in your database, you can simply insert a Sleep command after each beep to put a short break between the sounds. Even a one-second delay is enough to separate the beeps and make them easily noticeable.

Rather than copying and pasting beep and Sleep lines multiple times, it is much more efficient to use a loop. A for-next loop lets you repeat a set of commands, such as beeping and then sleeping, for any number of times you'd like. First, you declare a variable for the loop counter, such as x as Long. Then you set up the loop to run from 1 to however many beeps you want. Inside the loop, you call the beep and then sleep for the desired interval. This way, you can quickly adjust the number of beeps or the length of the pause as needed.

In my demonstration, I also used a status box to display the current count as the loop runs. This kind of real-time feedback can make it clear how many times the loop has executed, and you can add any other notification messages you find helpful.

For those who want to go beyond the basic system beep, you can make Access play an actual sound file, such as a WAV file. I cover how to do this in the extended cut of this lesson, which is available to members. Playing a custom sound gives you much more flexibility and lets you add a personalized notification when your report has finished running.

This benefit, along with many others, is available if you become a member on my website. Silver members and up get access to all extended cut TechHelp videos, plus monthly free beginner classes. Gold members can also download all my sample databases and gain access to a library of reusable code, along with higher priority for TechHelp questions and free expert classes. Platinum members receive everything from the previous levels, with priority support and full access to my entire library of beginner courses for all topics I teach, not just Access.

While I offer several membership options for enhanced content and services, all of my TechHelp videos will always remain freely available as long as people keep watching them.

You can find a complete video tutorial with step-by-step instructions on everything discussed here on my website at the link below. Live long and prosper, my friends.
Topic List Using the Beep command in VBA to play system sounds
Demonstrating how stacked beeps sound without delay
Declaring and adding the Sleep function in a module
Using Sleep to pause between beeps in VBA
Implementing a for-next loop to play multiple beeps
Setting the pause duration with milliseconds in Sleep
Displaying status updates during the beep loop
 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/2/2026 12:06:51 AM. PLT: 1s
Keywords: TechHelp Access beep, sound, wav file, mp3, play sound, beep macro action, beeping sound, How to play sound in Access, How do you add audio to Access, Play Sound on Your Microsoft Access Forms  PermaLink  How to Play Sounds or Beep in Microsoft Access