I have a continuous form based on a table displaying multiple records. One field on the form and in the table is called "select" (Yes/No type). When the form is open the users will use the built in filter functions to filter displayed records. I am trying to create a "select all" function that will update only the filtered records "select" field to Yes. I have the following code in place on the click event, but it updates all of the records in the database to "yes".
How can I just update the records that are currenly displayed on the form?
'Dim dbs As Database
'Dim rst As Recordset
'Dim ys As Boolean
'ys = True
'n = False
'Set dbs = CurrentDb
'Set rst = dbs.OpenRecordset("NEW_CYCLE_MAIN"
' Do Until rst.EOF
' With rst
' .Edit
' !select = ys
' .Update
' rst.MoveNext
'End With
'Loop
'dbs.CLOSE
'Requery
Thanks
How can I just update the records that are currenly displayed on the form?
'Dim dbs As Database
'Dim rst As Recordset
'Dim ys As Boolean
'ys = True
'n = False
'Set dbs = CurrentDb
'Set rst = dbs.OpenRecordset("NEW_CYCLE_MAIN"
' Do Until rst.EOF
' With rst
' .Edit
' !select = ys
' .Update
' rst.MoveNext
'End With
'Loop
'dbs.CLOSE
'Requery
Thanks