[AccessD] Checkbox dates

jwcolby jwcolby at colbyconsulting.com
Sat Jul 14 16:48:32 CDT 2007


In fact you really need a click event.  Otherwise if a user tabbed through
the control it would change just by getting the focus so to speak.  The
check box cannot be bound because it is a binary value, not a date type. 


John W. Colby
Colby Consulting
www.ColbyConsulting.com 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.TEJPAL
Sent: Saturday, July 14, 2007 10:28 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Checkbox dates

    Apparently the hidden bound text box used for storing date stamp is
meant to act as a slave to the check box in question. This would imply that
the contents of this text box are not to be disturbed unless there is user
action on the check box. Is this correct ?

    If so, would it not be convenient to make the check box also a bound one
? AfterUpdate event of the check box should then be the most suitable event
for placing Steve's code, and as already indicated by him, no code should be
needed anywhere else.

A.D.Tejpal
---------------

  ----- Original Message -----
  From: jwcolby
  To: 'Access Developers discussion and problem solving' 
  Sent: Saturday, July 14, 2007 11:26
  Subject: Re: [AccessD] Checkbox dates


  Oh, never mind.  I see that you do it in the On Enter as opposed to the
  OnClick.  Doing it this way would get rid of the need for the code in the
OnCurrent event of the form.  I will test that and see what I see.  Simpler
is better.

  Thanks for the feedback.

  John W. Colby
  Colby Consulting
  www.ColbyConsulting.com
  -----Original Message-----
  From: accessd-bounces at databaseadvisors.com
  [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel
  Sent: Saturday, July 14, 2007 1:39 AM
  To: Access Developers discussion and problem solving
  Subject: Re: [AccessD] Checkbox dates

  You are entirely correct, John.  You couldn't check/uncheck the checkbox
in the usual way, as it is a calculated control.  If you wanted to do this,
using the "old-fashioned" method, one way would be code something like this
on the Enter event of the checkbox control:

      If Me.NameOfCheckbox Then
         Me.YourDateField = Null
      Else
         Me.YourDateField = Date
      End If
      Me.SomeOtherControl.SetFocus

  Regards
  Steve

  << SNIPPED >>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list