[AccessD] Trapping a Check Box
Steve Schapel
steve at datamanagementsolutions.biz
Mon Oct 30 19:47:01 CDT 2023
Hi Rocky
I can't readily find an example of this to check, and not able to test
right now. But I'm pretty sure I have done something like this before -
so hopefully the following will point in the right direction...
Hide the checkbox.
Put an unbound textbox on the form, and make it a small square shape.
Set the FontName property of the textbox to Wingdings (or another font
that has a suitable symbol).
Set the Control Source property of the textbox to =ü (check mark in
Wingdings) or other suitable.
On the Click event of the textbox, write code to update the value of the
Yes/No field in the underlying table, and then Requery the form.
Set up Conditional Formatting for the textbox such that where the
Expression Is for the Yes/No field is True, the Fore Colour is different
from the Back Colour, and where the Expression Is for the Yes/No field
is False, the Fore Colour is the same as the Back Colour.
Give that a go.
Regards
Steve
On 31/10/2023 6:41:31 am, "Rocky Smolin" <rockysmolin2 at gmail.com> wrote:
>Dear List(s):
>
>I have a form the record source of which is a non-updateable query. On the
>continuous form are two check boxes which need to be updated. No problem.
>In the Mouse Down event, I take care of everything that needs taking care
>of when the state of the check box changes.
>
>However, there are some records where those check boxes need to be kept at
>false and I know what the condition is to test to know whether a change
>from false to true is illegal (if they were text boxes, it would be simple
>- use conditional formatting to make those boxes disabled. But that would
>be too easy. No conditional formatting on a check box).
>
>I've tried a few things in my MouseDown event to keep that check box false
>but have failed to find the solution. 😲(
>
>Does anyone know how to do this?
>
>MMTIA
>
>Rocky
>--
>
More information about the AccessD
mailing list