Activate check box

  • Thread starter Thread starter CB
  • Start date Start date
C

CB

Is there a way to activate a check box on a double click? Or have a
confirming statement "are you sure you want to check this?" Just seems a
single click can activate / check it too easy, so easy that you may not
notice that you selected it.

Let me know

Thanks!

CB
 
On Tue, 2 Feb 2010 05:46:01 -0800, CB <[email protected]>
wrote:

Typically it is counter-productive to want to change the way Windows
works in all applications except yours.

In your <checkbox>_BeforeUpdate event you can write:
if <checkbox>.Value = True then
Cancel = (Msgbox("Are you sure?", vbYesNo or vbQuestion) = vbNo)
end if

-Tom.
Microsoft Access MVP
 
You can use the BeforeUpdate event to ask an cancel if you wish. Something
like (aircode):

Private Sub chkWhatever_BeforeUpdate(Cancel As Integer)
If MsgBox ("Are you sure", vbYesNo,"Confirm") = vbNo Then
Cancel = True
End If
End Sub
 
CB said:
Is there a way to activate a check box on a double click? Or have a
confirming statement "are you sure you want to check this?" Just seems a
single click can activate / check it too easy, so easy that you may not
notice that you selected it.

Let me know

Thanks!

CB


You can prompt the user to confirm the action in the BeforeUpdate event
procedure ...

Private Sub chkTest_BeforeUpdate(Cancel As Integer)

If MsgBox("Are you sure?", vbYesNo + vbQuestion, Me.Caption) = vbNo Then
Cancel = True
End If

End Sub
 
CB,
The easiest would be the "Are you sure" message.
Use the BeforeUpdate event of the checkbox.

Private Sub SomeCheck_BeforeUpdate(Cancel As Integer)
If MsgBox("Are you sure?", vbOKCancel) = vbCancel Then
Cancel = True
SomeCheck.Undo
End If
End Sub

--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Is there a way to activate a check box on a double click? Or have
a confirming statement "are you sure you want to check this?"
Just seems a single click can activate / check it too easy, so
easy that you may not notice that you selected it.

As others have suggested, you can put a confirmation dialog in the
BeforeUpdate event.

I wouldn't recommend it, but one way to override default behavior of
a control like this is to put a transparent command button sized to
the exact same size over top of it. You could then have nothing for
the single click event, and have a doubleclick event with a
confirmation that would set the value of the checkbox. The only
issue I can think of is that you'd get no visual representation of
focus (though that's often so subtle for checkboxes that most people
would never notice).
 
Given the size of a checkbox in Access, I find it very difficult
to believe that any user wouldn't realize that they had selected
it!

By tabbing into it? So far as I know, other than right-click and
cancel the shortcut menu, there is no way to click on a checkbox to
select it -- any click actually updates it.
The usual question
we see is asking how to make the checkbox larger because people
have a hard time clicking on it!

As has already been suggested, changing the standard way Access
behaves is seldom a good thing! It tends to tick off the end user,
especially if they are experienced Access users.

I agree, but I thought it was a good opportunity to suggest the use
of a transparent command button, which many people don't even know
exists.
 
Back
Top