Solved

Stop beep when click on locked control

Posted on 2004-09-09
8
365 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
Comment Utility
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
Comment Utility
Haven't tried it, but have you tried setting Button=0 before you exit the event?
0
 
LVL 14

Author Comment

by:ragoran
Comment Utility

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
 
LVL 14

Author Comment

by:ragoran
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 75 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now