[AccessD] fill in x field if y field is checked

John W. Colby jwcolby at colbyconsulting.com
Tue Oct 5 16:56:06 CDT 2004


That's true, but doesn't negate the fact that it is duplication of
information.  I stated that it is a convenience.  The text box could be
filled with a code to indicate that it needed to be filled in or something.
Normalization is about storing info in one place so that multiple locations
don't have to be kept in sync.  

This is a rather classic case where two places have to be kept in sync.  If
the check box is checked, then the text box has to be filled else the text
box has to be cleared.  Assuming that the check box is used somewhere (in
queries etc) then if the text box is filled, the check box has to be filled.
And so you chase your tail.  I am not making a judgment as to whether it is
a necessity, simply stating a fact that this is the case and if it is
possible to get rid of the duplication, life is usually simpler.

I also answered the original question about how to attempt to keep them in
sync, and some issues perhaps not considered.

John W. Colby
www.ColbyConsulting.com 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Tuesday, October 05, 2004 5:11 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] fill in x field if y field is checked


However, it could be that someone or the system determines the requirement
for the text box to be filled in, and then someone else fills in the text
information.

Dan Waters

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, October 05, 2004 3:45 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] fill in x field if y field is checked

Are you a programmer?  

In plain VB, in OnClick of the checkbox, check if the box is checked or
unchecked.  If checked, place the cursor in the text box and open a message
box or some such.  If unchecked, clear out the text box.  You would want to
also do things like disable the text box unless the check box is checked
etc, or alternately if the text box has something entered, then check the
check box.  

This is in fact a facet of normalization where you have the same information
stored in more than one place.  The check box stores the fact that
contributions are restricted, but the simple fact that something is in the
text box stores the fact that contributions are restricted.  You don't need
the check box at all, it is a convenience which  raises ugly issues such as
how to keep the two controls in sync.

John W. Colby
www.ColbyConsulting.com 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of augusta
Sent: Tuesday, October 05, 2004 4:00 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] fill in x field if y field is checked


I need to know how to make a field required if another field is checked. For
example: If the contributions are restricted, then fill in the restricted
reason.

Can anyone help  - in plain English?

Thanks Augusta





More information about the AccessD mailing list