Unanswered: Tagging records from a filtered recordset?
I've created a yes/no "Tag" field in order to facilitate mail merging. I perform a number of different filters to select records. The idea is to tag just these filtered records for my mail merge query. I created a cmdTagAll to try to tag all filtered records simultaneously. However, when looping through my current recordset, ALL records in the open recordset get tagged, not just those in the resultset.
Any ideas how I tag just those records in my filtered recordset so that I can then create my mail merge query? (I'm using MSAccess 2002).
Originally posted by johncameron
would it be possible (or easier?) to use an update query instead?
I thought about this solution. The problem is that my filter conditions change, so I would have no consistent SQL statement to define a query. I though about somehow passing these filtered records to an update query, but I would again run into the problem of somehow tagging these filtered records to pass them into the update query. It's a Catch 22! Any ideas?
if i understand correctly
create a temp table with all the filtered recoreds in it.
use an update query to update the records where they match the records in the temp table.
delete the temp table
is this what you want to do?
sorry about the delay again
i think itll go something like this
Dim nameofdatabase AS DAO.Database, table AS DAO.Recordset,
filter AS DAO.Recordset
Set nameofdatabase = CurrentDb
Set Filter = nameofdatabase.OpenRecordSet("nameofquery")
' you can use the combo on your form to specify the name of the filter i m guessing your using querys
Set table = nameofdatabase.OpenRecordSet("Nameoftable", _ dbOpenTable)' table you want to update
"Select etc;" ' make table temp nake sure all flters have the same column headings
i hope this helps i havnt tested but it should put you on the right track