Detecting changes on form

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a form which has several sub forms. I need to check when anything on
a form is changed including on any of the sub forms. Would it be enough to
check the AfetrUpdate of the main form or do I need to check AfterUpdate of
each sub form too, or do something else?

Many Thanks

Regards
 
Why would you use the AfterUpdate Event to detect change (in data)???

I think the more appropriate Event would be the Form_Dirty Event and you
need to use the Dirty Event of the main Form (for changes on the main Form)
and the Subform (for changes in the Subform).
 
The problem with using the afterupdate procedure is that the update
has already occured,
By using the form.isdirty you get a bolean value as to whether any
changes have been made.

This is ideally the best way to check your code.
Also a better time to do this is on the BeforeUpdate procedure if you
wanted to put in any checking or the like.
 

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