Changing Field values after a report is printed

  • Thread starter Thread starter TimJames
  • Start date Start date
T

TimJames

I have a form that is filled out by a user for deliveries, one product per
entry. The users may create several entries for different products for
delivery to various areas. After the form is filled out a button is clicked
that generates a report to print out for obtaining signatures for delivery.
Is there a way to also change the value of a field in my table to indicate
that the delivery / form has been printed? I need this as sometimes a second
delivery for that day may be needed and I do not want the deliveries that
have already been made to be printed again.

Thank you,
~Tim
 
On Fri, 29 Jan 2010 12:39:01 -0800, TimJames

Sure. You can ask the user:
if Msgbox("Print OK?", vbYesNo or vbQuestion) = vbYes then
'TODO: Run update query
end if
Perhaps this code could be in the Report_Close event.

The details will depend on the exact circumstances of your app.

-Tom.
Microsoft Access MVP
 
Tim -

You can update the field when the user clicks the button to print. If the
field is not on the form, add it (you can make it not visible if you don't
want the users to see it). Then in the code behind the Click event of the
print button, add something like this (use your control name):

Me.DeliveryPrinted = True
Me.Dirty = False ' to save the record.
 
Back
Top