The On click event of the button on the main form is as follows:
Expand|Select|Wrap|Line Numbers
- Private Sub txtselectall_Click()
- Dim a
- Dim i As Long
- Dim F As Form
- Dim RS As Recordset
- ' Get the form and its recordset.
- Set F = Me.qry_Aknowledgement_subform Set RS = F.RecordsetClone
- If IsNull(Me.[qry_Aknowledgement_subform]!FName) Then
- MsgBox "One or more Applicants missing to Aknowledge for this position. Please select another Position", vbQuestion + vbOKOnly, "No Applicant"
- Exit Sub
- End If
- a = MsgBox("You are about to set the applicants shown as Acknowledged. Are you sure", vbExclamation + vbYesNo, "Proceed with aknowledgement?")
- If a = vbYes Then
- ' Move to the first record in the recordset.
- RS.MoveFirst
- ' Enumerate the list of selected records
- Do Until RS.RecordCount = 0
- RS!AckIssu = "Yes"
- Loop
- RS.MoveNext
- Else
- Exit Sub
- End If
- End Sub
Subform: qry_Aknowledgement_subform
Datasheet Column: AckIssu
Thanks in advance.
Jerry