Change field value upon Printing

  • Thread starter Thread starter Stephen
  • Start date Start date
S

Stephen

I have a report that prints labels for specific orders.
My Orders Table has a field "PrintLabel" which is Y/N and
defaults to Y.

My report prints all records with "PrintLabel"=Y through
a query...pretty simple. Here's the question...

Can I get Access to set the field "PrintLabel" to N
automatically after the Report containing that record has
been printed. Right now I go to each record and manually
set the field to N, so the next time I print the report
those same records do not appear.

Thanks in advance.

Stephen
 
This works for me:

Private Sub Form_Close()
Dim strSQL As String
strSQL = "UPDATE MyOrdersTable SET PrintLabel= 0" 'set to No
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
End Sub

HTH,
Debbie


I have a report that prints labels for specific orders.
My Orders Table has a field "PrintLabel" which is Y/N and
defaults to Y.

My report prints all records with "PrintLabel"=Y through
a query...pretty simple. Here's the question...

Can I get Access to set the field "PrintLabel" to N
automatically after the Report containing that record has
been printed. Right now I go to each record and manually
set the field to N, so the next time I print the report
those same records do not appear.

Thanks in advance.

Stephen
 
Back
Top