How to update text box after check box is selected

mitchem1

Registered User.
Local time
Today, 16:09
Joined
Feb 21, 2002
Messages
153
On my form, I have a check box called Destroyed and 4 text boxes called Storage Area 1, Storage Area 2, Storage Area 3, and Storage Area 4. If the user selects the Destroyed text box, the data in the Storage Area(s) should be cleared. What event and what code would I use to trigger this? Thanks.
 
You would use the click event of the check box. Enter the following code in the procedure...

If Destroyed = True Then
Me.[Storage Area 1] = ""
Me.[Storage Area 2] = ""
Me.[Storage Area 3] = ""
Me.[Storage Area 4] = ""
End If
 
Do you actually have fields in your table named [Storage Area 1],[Storage Area 2],Storage Area 3],[Storage Area 4]? What happens if you gain a 5th Storage Area?

You need to normalize your database if this is the case. Read up on 'database normalization' (http://support.microsoft.com/default.aspx?scid=kb;EN-US;q100139) or search the archives. You will need two tables with a relationship eventually, if I understand what you're doing correctly.

Good luck,
David R
 

Users who are viewing this thread

Back
Top Bottom