I have a form with a subform in datasheet view. The subform shows name and phone number and a checkbox that says "use this contact". When selected, the name and number populate text fields on the main form.
The problem is that if the subform contains multiple records, the checkbox for each can be selected. The form holds the values of the last selected, but I'd like for there to be only one check - that is, if a user selects one, and then another, the first should automatically uncheck.
Code on subform:
Expand|Select|Wrap|Line Numbers
- Private Sub chkUseThisContact_AfterUpdate()
- If Me!chkUseThisContact Then
- Forms!frm_LandownerContact.LandownerContact = Me.FullName
- Forms!frm_LandownerContact.LandownerPhone = Me.Phone
- Else
- Forms!frm_LandownerContact.LandownerContact = Null
- Forms!frm_LandownerContact.LandownerPhone = Null
- End If
- Me.Requery
- End Sub