Can a report record that a record was listed?

  • Thread starter Thread starter Will Pittenger
  • Start date Start date
W

Will Pittenger

I want my report to list only records that have not been listed. So I have
a posted field (boolean) that defaults to false. My report is now grabbing
up to 12 records where Posted is false. Is there a way to set Posted to
true when the record is selected by the report?

Technically, there is one field that if I change the value (a status), I
need to reset the Posted field back to false. Do you happen to know if a
form can do that? (I can post that to the Forms group if needed.) Other
than those two conditions, there is no reason for Posted to change.
 
I suppose you could use VBA code in one of the Report's Events, but it would
be easier to use a variation of the Query/SQL that is the RecordSource of
the Report to make an Update Query that would reset the Posted Field.

Depending on the update environment in which you operate, you may need to
copy the Fields to be Reported to a Temporary table, then use them to match
back to the originals to be deleted.

Larry Linson
Microsoft Access MVP
 
Will said:
I want my report to list only records that have not been listed. So I have
a posted field (boolean) that defaults to false. My report is now grabbing
up to 12 records where Posted is false. Is there a way to set Posted to
true when the record is selected by the report?


The problem with this approach is that just because a report
prepares a record to be printed in the report doesn't mean
it was actually printed and that the right people received
it.

A more manageable approach is to use a date/time field (or a
posted ID field) instead of a simple Yes/No field. This way
you can assign the field before running the report and if
the report fails in any way, you can reprint the same
records any time you want by simply filtering the report by
the Date/Time.

Technically, there is one field that if I change the value (a status), I
need to reset the Posted field back to false. Do you happen to know if a
form can do that? (I can post that to the Forms group if needed.) Other
than those two conditions, there is no reason for Posted to change.

Easily. Just use the AfterUpdate of the status field's
control to reset the posted field:

Me.posted = False ' or Null in my suggested approach
 
Back
Top