Call a parent form function when the child is closing

  • Thread starter dave b via AccessMonster.com
  • Start date
D

dave b via AccessMonster.com

I have a several step process. Each process has a form. Each process form
can call to the same Downtime form. Each process form has the total amount
of Downtime when the form is loaded.

When a Downtime has been entered and the user exits the Downtime form, I
would like to call the function in the parent (process) form that calculates
the total Downtime.

I can already do this by using the On Activate event from the parent form.
However, I would like to do this programmatically from the child (Downtime)
form.
 
B

Barry Gilbert

What I usually do in this scenario is to open the Downtime form with
acDialog in the OpenForm method. When the user finishes entering data
in the downtime form, instead of closing the form, hide it with
Me.Visible=False.
This will return control to the calling procedure in the process form.
In the Process form, read the variable or control value from the
downtime form and then close the downtime form. You can then do what
you need to do with the value.

HTH,
Barry
 

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

Top