Make a beep sound when anything is typed into a locked textbox control

Zak14

Registered User.
Local time
Today, 23:41
Joined
Jun 27, 2014
Messages
166
Nothing else to explain really.
How can I get my database to make a beep sound when something is trying to be typed into a locked textbox control?

This is so that my users can know that it's locked (much like when the delete button is pressed on a new record).

Thanks.
 
Why not simply disable this text box ?
 
Why not simply disable this text box ?

There's a button on the form that unlocks the textboxes, so the user can enter data.
 
There's a button on the form that unlocks the textboxes, so the user can enter data.
When you unlock you can enable at the same time.

But normally a locked textbox will be gray so users should know they can't edit. If you also Disable it will turn white back.
You can change the BG or Text color so users will know when they can edit and when they can't.
 
the vba command to make a sound is simply Beep

there are number of events which still fire, even though the control is locked (but still enabled) - e.g. gotfocus, click, mousedown so you can put this code in one of them

if mycontrol.Locked then Beep

However from a users perspective, if they have the speaker switched off, they are not going to hear the beep anyway - would it be better to have a msgbox appear saying something like 'click the button to edit this field'?
 
When you unlock you can enable at the same time.

But normally a locked textbox will be gray so users should know they can't edit. If you also Disable it will turn white back.
You can change the BG or Text color so users will know when they can edit and when they can't.

the vba command to make a sound is simply Beep

there are number of events which still fire, even though the control is locked (but still enabled) - e.g. gotfocus, click, mousedown so you can put this code in one of them

if mycontrol.Locked then Beep

However from a users perspective, if they have the speaker switched off, they are not going to hear the beep anyway - would it be better to have a msgbox appear saying something like 'click the button to edit this field'?

I've already implemented a feature that lets users know whether it's in edit mode. See attached pic.

I just thought a beep would be easy to implement. If you see the picture, you'll see that the 'Age' box doesn't get unlocked, even if it's in edit mode. That's because is it bound to an expression, and when someone types into it, it beeps. I thought I should make it consistent by having all locked textboxes beep.

Is there a way then, to cancel the beep sound it makes when something is entered into the age box, where it's bound to an expression.
 

Attachments

  • Screenshot 2015-02-01 23.52.38.jpg
    Screenshot 2015-02-01 23.52.38.jpg
    85.9 KB · Views: 139
easiest way is not to have the code for the age control

If you make the control disabled and locked it will appear as normal i.e. not greyed out, and the user cannot select it in the first place
 

Users who are viewing this thread

Back
Top Bottom