Different Beeps on Form

S

SimonDeLikeable

Hi
A Client has requested a beep everytime an error or warning message
appears in the database. So, for example, if they try to save an Empoloyee
without entering a name, then the msgbox should always beep. If theres a
system error, there should always be a beep also. And in some instances, the
current form event should cause a beep. For example, if a timesheet has not
been exported, I flash the title red and sound a beep.

Now this system is over two years old, so I'm going through it finding
the different msgbox functions, and adding Docmd.Beep. However - Access
seems to have different beeps. As follows

DoCmd.Beep
MsgBox "Exported Timesheets cannot be deleted"

will sound a beep. However, it seems that all message boxes already make a
beep. But it varies depending on which option you have taken.

MsgBox "Exported Timesheets cannot be deleted", vbExclamation
will sound a different beep to
MsgBox "Exported Timesheets cannot be deleted", vbCritical

Its something I never paid any attention to before. Docmd.Beep seems to not
even run, but I reckon it just runs into the msgbox sound.
Any ideas how I can standardise the beep across the board? Sounds trivial I
know, but the customer is always right!

Thanks
Diarmuid
 
R

Ron Weiner

Ya know I never noticed that the Sound from the Beep or DoCmd.Beep was not
the same sound that the message box used. Gotta' love the customer who
first noticed the difference and HATES it. But she is the customer and
therefore she is right.

What happening is that Windows is playing the sound that is specified in the
Sounds applet in the control panel. These sounds are user configurable and
so it is possible on some machines MsgBox "XX", vbExclamation will sound a
different beep than MsgBox "YY", vbCritical. As it happens on my machine
with the standard (as far as I know) sound settings in Win 2K both of those
message boxes play the same identical sound file "chord.wav". The Beep on
the other hand plays "ding.wav" on my machine.

One way to fix this is to have all of the users configure their Control
Panel sound applet to play the same sound for ALL events. (Lot's of luck
with that one)

Another is to always use the same messagebox style argument in the standard
message box. (Yea I hate it too.)

Yet Another is to NEVER use the Access Message Box and instead design a form
that will replace it that always plays the same sound. (IMO this is just
like re-inventing the wheel. But you can have some fun with it as you can
determine what the sound should be. You could play the theme from the God
Father, or Beethoven's 9th, or the Mickey Mouse Club. This would be the
toaly cool way to handle this customers request.)

Lastly see if the customer is willing to compromise and just change all of
the sounds in the control panel sound applet on HIS machine. From his
perspective then all the sounds will be the same, and your differing beeps
will never bother him again.

Good luck

Ron W
 
S

SimonDeLikeable

Its one user who needs the change, the others won't notice. She types like a
mad thing, without looking at the screen, so the beeps prompt her to look.
I'll change her settings in the control panel.
Of course, if the other users do notice, I'll end up writing that custom
message box.... :)
Thanks!
Diarmuid
 

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