[AccessD] Trapping a Check Box
Steve Schapel
steve at datamanagementsolutions.biz
Thu Nov 2 20:06:38 CDT 2023
You're still going to want the text box to be clearly visible, Rocky,
because you're going to need to use its Click event to run code to
update your data.
Regards
Steve
On 3/11/2023 9:58:17 am, "Rocky Smolin" <rockysmolin2 at gmail.com> wrote:
>Just checked and you're right. I thought you couldn't do conditional
>formatting in an unbound text box but apparently you can. So I could hide
>the checkbox behind the text box which would either be transparent or solid
>with back color same as the backcolor of the detail section depending on
>the condition. That will work!
>
>I run into this from time to time and solve it by disabling the control in
>CF. But you can't do that check boxes. That will work.
>
>But I suppose I should leave some comments in the code for thenext
>guy...nah...he'll figure it out. 😲)
>
>Thanks
>
>Rocky
>
>
>On Thu, Nov 2, 2023 at 1:24 PM Steve Schapel <
>steve at datamanagementsolutions.biz> wrote:
>
>> Yes, Rocky, that's why I suggested an unbound textbox. That way, all
>> you are modifying with the CF is the fore colour, and possibly but not
>> necessarily back colour. I'm sure that'd do what you want.
>>
>> Regards
>> Steve
>>
>>
>> On 2/11/2023 5:17:37 am, "Rocky Smolin" <rockysmolin2 at gmail.com> wrote:
>>
>> >Well, it's a continuous form. I found out a while back that anything you
>> do
>> >to an object on a continuous form (Conditional Formatting es excepted)
>> will
>> >be done to that object on all lines of the form. So if I disappear the
>> >check box, it will disappear for all the checkboxes.
>> >
>> >However, I could place a bound text box over the check box and conditional
>> >format the text box to be visible or invisible depending on the value of
>> >another field which would be used to trigger the conditional formatting.
>> >The text box would have the fore and back colors the same as the forms
>> back
>> >color, and the border transparent...but as I'm writing this I realize that
>> >won't work because, while Conditional Formatting will allow
>> >Enabled/Disabled, it will not allow Visible/Invisible.
>> >
>> >Thankfully, the client decided to abandon he form that has this problem,
>> so
>> >It's just academic interest at this point.
>> >
>> >r
>> >
>> >On Tue, Oct 31, 2023 at 12:11 AM Paul Hartland via AccessD <
>> >accessd at databaseadvisors.com> wrote:
>> >
>> >> Can't think of the exact event but is there something called oncurrent
>> >> record, could you put the code in there to disable or enable the
>> checkboxes
>> >> ?
>> >>
>> >> Paul
>> >>
>> >> On Mon, 30 Oct 2023, 20:12 Rocky Smolin, <rockysmolin2 at gmail.com>
>> wrote:
>> >>
>> >> > It may be moot. Just talking to the client and for other reasons has
>> >> > decided that this form is no longer necessary - everything's
>> available on
>> >> > another for.
>> >> >
>> >> > Still, I wouldn't mind knowing if there is an easy way.
>> >> >
>> >> > r
>> >> >
>> >> > On Mon, Oct 30, 2023 at 10:58 AM Paul Hartland via AccessD <
>> >> > accessd at databaseadvisors.com> wrote:
>> >> >
>> >> > > Not played with access for a while, hopinv to have a play this
>> week for
>> >> > > someone else on this list unless they have got a solution, anyway
>> is
>> >> > there
>> >> > > a click event for the checkbox, if there is, have you tried
>> putting the
>> >> > > code in there instead.
>> >> > >
>> >> > > Paul
>> >> > >
>> >> > > On Mon, 30 Oct 2023, 17:42 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
>> >> > > > --
>> >> > > > AccessD mailing list
>> >> > > > AccessD at databaseadvisors.com
>> >> > > > https://databaseadvisors.com/mailman/listinfo/accessd
>> >> > > > Website: http://www.databaseadvisors.com
>> >> > > >
>> >> > > --
>> >> > > AccessD mailing list
>> >> > > AccessD at databaseadvisors.com
>> >> > > https://databaseadvisors.com/mailman/listinfo/accessd
>> >> > > Website: http://www.databaseadvisors.com
>> >> > >
>> >> > --
>> >> > AccessD mailing list
>> >> > AccessD at databaseadvisors.com
>> >> > https://databaseadvisors.com/mailman/listinfo/accessd
>> >> > Website: http://www.databaseadvisors.com
>> >> >
>> >> --
>> >> AccessD mailing list
>> >>AccessD at databaseadvisors.com
>> >>https://databaseadvisors.com/mailman/listinfo/accessd
>> >> Website: http://www.databaseadvisors.com
>> >>
>> >--
>> >AccessD mailing list
>> >AccessD at databaseadvisors.com
>> >https://databaseadvisors.com/mailman/listinfo/accessd
>> >Website: http://www.databaseadvisors.com
>> --
>> AccessD mailing list
>>AccessD at databaseadvisors.com
>>https://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>https://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list