Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 988
  • Last Modified:

DoCmd.Beep is silent

Ok, don't all computers have a little internal speaker to squalk out beeps (even when there is no sound card)?
What command do I use to get my computer to squalk when a user does something stupid?

DoCmd.ThatWasReallyDumb isn't working either!

Thanks,
David
0
DavidWare
Asked:
DavidWare
1 Solution
 
GRayLCommented:
Click Start, Control Panel,Sound and Audio Devices, Volume Tab and make sure mute is not selected.  Alternatively click on the Speaker in the  Task bar/tray and make sure the speaker is on.
0
 
dsackerContract ERP Admin/ConsultantCommented:
You can try to imbed the beep character in your message (like in a MsgBox command):

MsgBox "There are several beeps " & Chr(7) & Chr(7) & Chr(7) & Chr(7) & Chr(7) & Chr(7) & Chr(7) & Chr(7)

However, most times VBA will print a small box character  instead of passing through that ascii value.
0
 
flavoCommented:
try the API to use the PC Speaker

Public Declare Function Beep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

Use it like,
Beep 800, 100
0
 
DavidWareAuthor Commented:
Sorry, I lost track of this one.

GRayL,
The Control Panel in my Win2K operating system has "Sound and Multimedia", so I opened that and I don't see a "Volume" tab (there is "Sounds", "Audio", and "Hardware" and nowhere is there a "Mute" (except in the "Volume Control" when I double-click the Speaker in the systray, and none are muted.)
On the "Sounds" tab, I scroll through the different sounds (like "Default Beep", which is listed as "ding.wav", but I don't think I'm barking up the right tree, because those use audio files that would go through the sound card and the speakers, and this system makes absolutely no sound at all (and I'm trying to write this ap for systems that don't necessarily have any speakers).  I'm looking for something more system-level that would use the motherboard speaker.
I think that you're on the right track, though because of the very fact that this system makes absolutely no sound at all.  Next time I turn it off, I'll open the case and look at the motherboard.  Maybe there IS NO squalker.

dsacker, I have coded in DoCmd.Beep and nothing happens - wouldn't that be (basicly) the same?

flavo,
I have added the API call as you recommend.  I'll see where that leads.

Thanks for everyone's input and I'll get back here again soon.
David

0
 
DavidWareAuthor Commented:
The API worked!
Thanks to all.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now