Solved Sub Form

sbaud2003

Member
Local time
Tomorrow, 01:02
Joined
Apr 5, 2020
Messages
186
I have a Sub form (datasheet View) I have a Check box to selct the items selected for payment, is there any process to select all at a time (if required) without selecting each at a time
 
You could use an update query with criteria that restricted it to the records displayed on the subform.
 
add a CommandButton on the main form (cmdCheckAll).
add code to it's click event:

private sub cmdCheckAll_Click()
With me.SubFormName.Form.RecordsetClone
If Not (.BOF And .EOF) Then .MoveFirst
While Not .EOF
.Edit
!checkboxField = True
.Update
.MoveNext
Wend
End With
end sub
 
You could use an update query with criteria that restricted it to the records displayed on the subform.
Thanks for the help.
I made an update Querrey as per your guidance and it is working fine...
Thanks
 
add a CommandButton on the main form (cmdCheckAll).
add code to it's click event:

private sub cmdCheckAll_Click()
With me.SubFormName.Form.RecordsetClone
If Not (.BOF And .EOF) Then .MoveFirst
While Not .EOF
.Edit
!checkboxField = True
.Update
.MoveNext
Wend
End With
end sub
Thanks
 
tHHNS
Thanks
tHANKS....
I have another problem, i have a querry based on relation ship having common field Called DV of the form 11 of 04/2020, means sl no 11 pf April 2020, I wanted to get the month name from DV bu using formula MN: MonthName(Left(Right([DV],7),2)), but it gives error shoing this DV could refer to both the table. In there aby way to extract the data from this field.
 
you add the table name to your expression:

tableName.DV
 

Users who are viewing this thread

Back
Top Bottom