I understand what you are both saying but it still does not get at what I
need so maybe I am not explaining it correctly. If I have the fields
autopopulate with 0 then it makes it very difficult for the user to look at
the form/table to see where they have entered data and where they have not
entered data. By clicking on a check box, it tells the project manager they
have reviewed the data and agree that it is complete. Instead of having them
review the data and then enter all the 0's I would wanted them to just be
able to click the checkbox and then have it autopopulate.
You could use the AfterUpdate event of the checkbox with some VBA code to loop
through all the controls on the form. It would simplify matters if you set the
Tag property of each control which should be autopopulated to 1 so the code
can tell what to populate and what to skip. Example code might be
Private Sub chkReviewed_AfterUpdate()
Dim ctl As Control
If Me!chkReviewed = True Then ' only populate if the box was checked
For Each ctl In Me.Controls ' loop through all controls on form
If ctl.Tag = 1 Then ' only populate the desired controls
If IsNull(ctl.Value) Then
ctl = 0
End If
End If
Next ctl
End If
End Sub
this is important becasue I will need to do the same task for another
database in the upcoming days where the user enters data into over 200 field.
you *do* know that a) there is a hard limit of 255 fields in any Access table
and b) that a table with 200 number fields is *CERTAINLY* incorrectly
designed? You should REALLY stop and check your table normalization before you
plunge into this misguided form design!!!
Is there a way to set the default to 0 but not actually have the 0 show up
on the form until the user checks the box?
No.