Peter,
I'm assuming the "list of check boxes" you cite are in fact "any combo of 5
people who can enter data". So, I'm seing a list box of 5 names (instead of a
check box in front of each name). I'm also visualizing someone in charge of
reviewing the record and identifying the persons who entered data:
(Reference your "User checks those [two] people and their names are entered
in the field").
I suggest an unbound control as a list box on your form listing the names of
the 5 persons who normally enter data. Perhaps short names would be best,
such as J.Black, T.Holmes, B.Barker, etc.
The name of the unbound control might be "Staff_unbound".
In form design, create space to place the unbound control, perhpas a
vertical box where you list the five staff person names. You should already
have a text field in your underlying table that will be populated with the
names of the staff whom the "User" (Reviewer/Supervisor?) will select as
having worked on the record that day. This text field might be named,
"Staff_string".
In form design, click on the unbound control, Staff_unbound, then open the
Property Sheet and from the list of properties, activate (create) Event
Procedures for AfterUpdate and GotFocus. On the line, AfterUpdate [Event
Procedure], click on the right side button to display space for writing in
your Event Procedure code:
Private Sub Staff_unbound_AfterUpdate()
If IsNull (Staff_string) Then
Staff_string = Staff_unbound
Staff_unbound = Null
Elseif Not IsNull (Staff_string) Then
Staff_string = (Staff_String) & ", " & (Staff_unbound)
Staff_unbound = Null
End if
DoComd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
End Sub
For the GotFocus Event Procedure, use the following:
Private Sub Staff_unbound_GotFocus()
Me.Staff_unbound.Requery
End Sub
If the User (Reviewer/Supervisor?) selects three of the five names of the
staff who worked on the record the same day, the Staff_string control on the
form (i.e. table field it is bound to) will display something like,
"D.Parker, T.Diem, S.Diego, etc."
If your form lacks space, you can use a combo box (drop down list) in lieu
of a vertical list that displays all five names. Of course, if your workers
log on to a network, there are methods to capture the workers' names
automatically using a similar Event Procedure coding.
Hope this is helpful,
Tank
peter kappes said:
I'm trying to make a form where the user will get a list of check boxes and
can select as many as are appropriate and then this data is entered into a
field on the associated table.
e.g. Any combo of 5 people can enter data. The user needs to enter who
entered data on this day. For this day only two people entered data. User
checks those two people and their names are entered in the field. etc...
Thanks in advance.
Peter