Update counter on 1 form based on updates from separate form

  • Thread starter Thread starter Jim Thompson
  • Start date Start date
J

Jim Thompson

Cheers all -

I'm trying to figure out how to accomplish this with
the .NET Framework. I'm doing updates and inserts to my
Access database on 1 form while a separate form in the
background remains open. Once I'm through and close the
current form, I want the counters I have displayed on the
background form, which is now the only one open, to
update. Since I'm not creating a new instance of the
form, where I could attach my code to the instantation
part, what event can I call that gets triggered when the
form closes? I've tried the GotFocus but it doesn't get
called. Does any event get called and if not, any
suggestions are appreciated.

Much thanks -

JT
 
Hi Jim,
You can create public property in Form1 and pass the object of this form to
BackgroundForm constructor where u can store in variable. On OnClosing
event, you
can update the property with your counter.

Hope this help.

Javed.
 
Back
Top