Set a flag when updates occur in a subform

  • Thread starter Thread starter Rod Manson
  • Start date Start date
R

Rod Manson

I want to set a flag when updates occur in a subform, so that when the main
form closes, a number of procedures run. Can anyone suggest the most
appropriate VBA code to use please?

Thanks.
 
Forms have a Dirty event. Write code in that event to do whatever it is you
want to do.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
I have declared a global variable and written code that sets a flag in the
After Update event of the subform, but I don't know how to make the main form
see it. Can you suggest what I need to do?

Thanks.
 
Hi,
if you made public variable in subform's form class module, then you can
refer to it as:

Me.MySubform.Form.MyVariable

if in main form then you can refer in subform as Me.parent.Form.MyVariable

if you declared in common module - then just MyVariable


--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
Back
Top