Solved

Stop beep when click on locked control

Posted on 2004-09-09
8
367 Views
Last Modified: 2008-01-09
In Access 2000,

I have a form which contains a checkbox bound to a formula.  The checkbox is enabled but lock.

I am doing some processing on the MouseDown event of the checkbox and everything is working fine ... except that my speaker was off.

When I tried it on another PC, I notice that Access is doing "beep" every time I click over the checkbox.  This is annoying.

Does someone lnow how to prevent the beep (other the turning the speaker off wise guys ;-) ) ?

Can I remove the click form teh event queue after I process teh OnMouseDown event (the beep is heard after my event has run) ?


Thanks
0
Comment
Question by:ragoran
  • 4
  • 2
  • 2
8 Comments
 
LVL 2

Expert Comment

by:JakeBushnell
ID: 12023349
Hi Ragoran, is there an alert box or any message that pops up in the code for that event? By default a locked control does not have any a "beep" or any sound for that matter. However, if you may have something triggers that beep in you code.

If you could post what happens in that event we can take a look for you.

Jake Bushnell
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12023388
Haven't tried it, but have you tried setting Button=0 before you exit the event?
0
 
LVL 14

Author Comment

by:ragoran
ID: 12025853

There are no msgbox, no popup or anything, just beeps.

Another easy way to reproduce this behavior is:

1 - Create a new form
2 - put a checkbos on it, set the control source to "=true"
3- run the form, click on the checkbox --> beep


I think it is the way that Access is notifying the user that it can't accept this event because the checkbox can't be change interactively because it is bound to a formula, thus locked.

But I want to trap the event to do something.  

Because the control is to be used in a continuous form, it can't be unbound.

This is frustrating because I was about to post a solution to the continous form multi-select question we get every other days.  As well as highlighting the current row in a continuous form, etc. And this is the last detail not working...


0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 14

Author Comment

by:ragoran
ID: 12026052
Shane:

Good try, but setting Button = 0 doesn't change a thing.  

It make sense as the Button parameters is declared byval, not byRef, so the calling (event handler) does not see the change.

0
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 75 total points
ID: 12026078
Hmm - the same method works with the KeyDown event (setting the KeyCode=0 prevents further processing of the keyboard buffer) so I thought that might work. Oh well...

On a side point, Access (2002) does not beep for me when I try to click on a field bound to a calculation.
0
 
LVL 14

Author Comment

by:ragoran
ID: 12026159
Oh, I will try tonigh at home where I have Access 2003 installed...

You are right about the keyDown event... but this parameter is noy byRef either... that I don't understand.

I just notice that when the access beeps, I also have a message in the status bar saying "Control can't be edited, it is bound to the expression 'False' "

0
 
LVL 2

Assisted Solution

by:JakeBushnell
JakeBushnell earned 50 total points
ID: 12027539
Hi ragorn, I tried what you mention before my first post. It did not beeb at all. I am using 2002.
Jake Bushnell
0
 
LVL 14

Author Comment

by:ragoran
ID: 12219221
Apparently, it is a set behavior in Access 2000 (and before?) but both Access 2002 and 2003 don't beep.  I guess I will leave it at that for the moment.

Thanks you all

Ragoran
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question