Print report when data changes

I

Ivor Williams

I have a form with a subform. If the data in the subform changes, I want to
print a report when the form is closed. If there is no change in data in the
subform, I don't want the report to print. How can I accomplish this?

Ivor
 
D

Damon Heron

You could have a command button on the main form that runs the report. On
open, set enabled to false.
then in the subform,

If Me.Dirty Then
Me.Parent!YourCommandbutton.Enabled = True
End If

HTH
Damon
 
I

Ivor Williams

I understand what you're suggesting, but I would rather just have the report
print automatically, without having to click on a command button. I've tried
On Close, On Unload, On Deactivate, but so far haven't got the desired
result.

Ivor
 
Top