[AccessD] Checkbox dates

jwcolby jwcolby at colbyconsulting.com
Sun Jul 15 06:50:23 CDT 2007


As we have discovered there are several ways to do this.  I have used the
method I suggested for other objects in the past and am comfortable with
that.  In fact, this is the kind of behavior that is a natural to migrate to
my framework.  By placing this behavior inside of my existing dclsCtlChkBox
I can "turn on" the behavior by passing in a text box to a property of the
dclsCtlChkBox and "voila" it would start behaving as a control for a date
display.  My dclsFrm can and does call each control already in it's
OnCurrent event because of previous behaviors where the control needs to
know when the form's current has fired (requerying dependent objects). 

Thus I will likely leave things the way they are for my usage, and you can
modify the concept to suit your own requirements.  I am content to have
demonstrated how to use a class to encapsulate the behaviors required to
perform this trick and get everyone thinking about classes and Event
handling in classes.

I do like A.D.s suggestion for allowing locking of the display based on the
state of the display to preserve the fact that it happened.  I already have
users and groups in my LightWeight Security System built in to the framework
so it is trivial to set up security to only allow specific groups to modify
the control after it is locked.

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: Sunday, July 15, 2007 2:19 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Checkbox dates

A.D.,

Not wishing to imply that I disagree with you in any way, because I like
what you are suggesting.  However...

A.D.TEJPAL wrote:
> ... If the form happens to be in
> continuous form or datasheet view, an unbound check box would be 
> untenable, leading to absurd display.

Just to be clear that I was not suggesting a totally unbound checkbox on the
form, but rather one whose Control Source is like this:
=[TheDateField] Is Not Null
This serves the purpose of displaying, even on a continuous view form,
whether the date has been recorded for each record.  And equally, the code I
suggested earlier, on the Enter event of the checkbox, can be used to manage
the date data.

I am just relating to how I have done this type of process in the past. 
  I am certainly not claiming that it is superior to yours or John's
suggested approaches.  But I do know that it has effectively and simply
served the purpose for me in various scenarios.

Next time I need this type of functionality, I will be considering the idea
of an extra (redundant ;-) ) field in the table, as you have described.

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