can't stop the beeping !

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have written a small routine behind a command button that employs "UseSQL" to update a master table with content from various other tables

problem is, each time the "UseSQL" command is executed, it displays a "Yes/No" dialog box to confirm copying the records. this is fine, as i have used SendKeys to confirm the action so you don't see it. however, each time the dialog is "displayed", you get the usual "beep"

is there anyway i can get mask/mute the beep ?
 
Stevie,

Generally speaking, the use of SendKeys is to be avoided if possible, as it
may prove quite tricky (do something else instead of wjat you intended it
to, possibly even wit irreversible results).
There is a far neater way to do what you want, i.e.suppress the confirmation
on your action query: in your code, precede the "UseSQL" line with the
following:
DoCmd.SetWarnings False
and then, right after the action query command,
DoCmd.SetWarnings True
to restore the original warnings status.

HTH,
Nikos

Stevie C said:
i have written a small routine behind a command button that employs
"UseSQL" to update a master table with content from various other tables.
problem is, each time the "UseSQL" command is executed, it displays a
"Yes/No" dialog box to confirm copying the records. this is fine, as i have
used SendKeys to confirm the action so you don't see it. however, each time
the dialog is "displayed", you get the usual "beep".
 
The setwarnings false option works quite well, I use it regularly

The only 'problem' with it is that it does exactly that - it stops warnings. So if there's an error, you don't see it

A better option is to use currentdb.execute. This will not give you the 'are you sure' errors, but will give you the 'oops - that didn't work' error. It'll allow you to trap the errors, and you're good to go

Hope this helps..

Gre

ps - agree as well - sendkeys = bad. :

----- Nikos Yannacopoulos wrote: ----

Stevie

Generally speaking, the use of SendKeys is to be avoided if possible, as i
may prove quite tricky (do something else instead of wjat you intended i
to, possibly even wit irreversible results)
There is a far neater way to do what you want, i.e.suppress the confirmatio
on your action query: in your code, precede the "UseSQL" line with th
following
DoCmd.SetWarnings Fals
and then, right after the action query command
DoCmd.SetWarnings Tru
to restore the original warnings status

HTH
Niko

Stevie C said:
i have written a small routine behind a command button that employ
"UseSQL" to update a master table with content from various other tables"Yes/No" dialog box to confirm copying the records. this is fine, as i hav
used SendKeys to confirm the action so you don't see it. however, each tim
the dialog is "displayed", you get the usual "beep"
 
Stevie,

One way is to click on the Tools pull down menu and select
Options. On the tab "General," if the option "provide
feedback with sound" (this is in the column on the left) is
checked, uncheck it.

HTH
ES
-----Original Message-----
i have written a small routine behind a command button
that employs "UseSQL" to update a master table with content
from various other tables.
problem is, each time the "UseSQL" command is executed, it
displays a "Yes/No" dialog box to confirm copying the
records. this is fine, as i have used SendKeys to confirm
the action so you don't see it. however, each time the
dialog is "displayed", you get the usual "beep".
 
Back
Top