Set a checkbox state to True with code

  • Thread starter Thread starter Del
  • Start date Start date
D

Del

I have a database that has one table, the table is made up of a couple
columns (Tracking Number, Date Rec, Time Red, Destination, Printed) The
Printed column is a Checkbox.

The database is used to scan shipping tracking numbers receiving into
the dock. The form is a continuous form and the user scans the tracking
numbers of each package.

Once all the tracking numbers have been entered the the user then
clicks on a Print Report button that will print a hard copy for all
tracking numbers entered.

The hard copy report is query driven to only pull records in which a
Printed checkbox is false.

What I would like to do is add some code to Print Report button that
would set all the Printed checkboxes in the table to true.

Thank you in advance for any assisatance.
 
To set all of them to True, an Update Query would be the easiest.

Example:
strSQL = "Update TableName SET TableName.Printed = True;"
CurrentDb.Execute strSQL, dbFailOnError
 
Back
Top