Need to check boxes on filtered form

T

Tammy F

I have a form, that I'd like the user to filter, then use a "Check All"
Button to select all the records that are filtered. I can't use an update
query like I know how to do, because it is filtered.
I thought about a do...until statement. But I don't know where to start with
that.
My form is frm_PriorityPackingS
The field to check is MHSelect

Thank you,
Tammy
 
M

Michael Gramelspacher

I have a form, that I'd like the user to filter, then use a "Check All"
Button to select all the records that are filtered. I can't use an update
query like I know how to do, because it is filtered.
I thought about a do...until statement. But I don't know where to start with
that.
My form is frm_PriorityPackingS
The field to check is MHSelect

Thank you,
Tammy

just by way of example:

Private Sub cmdCheckAll_Click()

Dim s As String

If (Me.FilterOn = True) Then

s = "UPDATE " & Me.RecordSource _
& " SET some_ckbox = True " _
& "WHERE " & Me.Filter & ";"

DBEngine(0)(0).Execute s, dbFailOnError

End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top