Full Version: close a one form based on another form moving to another record.
UtterAccess Discussion Forums > Microsoft® Access > Access Automation
Fox
Is there a way to write a cmd that will close one form based on if another form has moved to another record?

Thanks,
Fox
theDBguy
Hi Fox,

Welcome to Utter Access!

The code to close a form is:

DoCmd.Close acForm, "FormName"

You'll just have to figure out where to put it. One possibility might be in the Current event of the other form.

Hope that helps...
Fox
Absolutely fantastic...
I knew the DoCmd.Close code but didn't know where to put it. I placed everywhere but in the current event....
I placed it in the current event and like magic the form closes on record change...fantastic!!!!!!!!
Thank you for your help. I've been working on this for hours and hours and hours....
theDBguy
You're welcome. Glad it worked out for you. Good luck with your project.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.