[AccessD] Checkbox dates

A.D.TEJPAL adtp at airtelbroadband.in
Sat Jul 14 09:27:32 CDT 2007


    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 >>


More information about the AccessD mailing list