update a query field on close of a report?

B

Brook

Good Day All,

I know this should be easy, but I cannot figure it out. I have a field
"reconciled" which is a yes/no check box, and I would like this updated to
"true" on close of my rptcheckingaccount.

How do I code this in the on close event?

Thanks,

Brook
 
B

Brian

Make a query to do it, and call the query from the report's Close event.

Private Sub Report_Close()
DoCmd.OpenQuery "<yourQueryName>
End Sub

To ensure that reconciled is not set to true for all records in your table,
your query will need to identify the specific record(s) for which that field
should be updated. If you are running your query from a form, ensure that the
form has a text/combo box that holds this, and put this in the criteria of
the primary key (a batch or transaction ID, perhaps?? )in the query above:

[Forms]![yourFormName]![yourFieldName]
 
Top