Print report when data changes

  • Thread starter Thread starter Ivor Williams
  • Start date Start date
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
 
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 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
 
Well, It doesn't have to be a command button, it can be a subroutine that
you call if the subform is dirty.

Damon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top