Remember records list that have [Tag] = "Y"


In my database,  I have a file called [Tag] whose value can either be "Y" or Null.    The user has several ways to "Tag" a record.  Tagged records are used as criteria several reports.
This [Tag] field gets re-used all the time,   All tagged records become untagged before each re-use.

My scenario.
Let's say I tag 50 of 3000 records on Monday.  I will need to tag exactly the same ones on Friday.
On Tuesday, Wednesday & Thursday,  I will be using resetting / reusing that field for other reports.

My question.  Is there a way to save / reuse the list from Monday?
Who is Participating?
Dale FyeCommented:
If you are the only one doing this reporting, then having you [Tag] field in the base table of your database is fine, but if multiple people could be running reports simultaneously, then you would be better off using a temporary table located in your applications front-end, rather than the back-end.  If interested, check out my article on using temporary tables in Access.

You could create a table of Reports, and another for ReportTags.  The reports would have you list of saved reports, and the ReportTags would have fields to identify the Report (ReportID) and the tags for that report.  If you are only using a single table to tag records for the report, you would really only need the value of the primary key associated with each tag in this table.  If you are using more than one table for this process, then I would store the [TableName], [FieldName] that is used for the tag value, and a [FieldValue] column.

Then, when you user selects a particular report, I would create the temporary table with only the [FieldValue] values associated with that report.  Then, rather than setting the [Tag] value in your main table, you would simply join the two tables using an InnerJoin.  This way, there would be no conflicts between users trying to run reports at the same time.

After running the report, I would have a "SaveTags" button on my form which would allow me to save the tags for the report that was just run.  You might also want to have a SaveAs button to allow you to create new report criteria.
Sample DB could help, because you give no details about your data
You can add table with: ID (FK from your table with records), Tag, Weekday and save-restore data to/from this table. Function WD in Module1 is used for repeating reports (Monduay+Friday or other days)
Look at sample
peispudAuthor Commented:
Thank you all for your answers.
Dale FyeCommented:
glad to help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.