Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 6th, 2006, 04:36 PM
Registered User
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to rosebushr
Default Closing a form after opening another form

I am very new to programming so please speak slowly to me. I am working on a program that uses forms instead of switchboards to navigate from one form to another (please don't ask me why I am doing it this way). The problem that I am having is that when I use a macro to take me from one form to the next, it leaves the old form open. I want the old form to close when I open the new one. How do I go about doing this? I am looking for a universal way of closing the form and not just closing it from a specific form. I know I can use a docmd.close but I am not always coming from the same form form. I can come to the new form from multiple different directions. So I need commands that generically close an old form before they open the new form.

Please be specific because I will just be copying whatever you tell me to do. Thank you for your help.

Old January 6th, 2006, 05:36 PM
Friend of Wrox
Join Date: Dec 2005
Posts: 142
Thanks: 0
Thanked 0 Times in 0 Posts

In the form calling to open a new one, end whatever function is opening the new form with this:

    DoCmd.OpenForm "frmName"

Old January 7th, 2006, 04:34 AM
Friend of Wrox
Join Date: Dec 2005
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anukagni Send a message via Yahoo to anukagni

Did u understand the above said it may good but u can use the switch board or give the exit option for colse the pervious from before moving to the another from . how ur Operating the opening do u have an main menu to go to the other froms ? or ur using an coomand button each from to nevigate to others


Similar Threads
Thread Thread Starter Forum Replies Last Post
closing a form mnvijay VS.NET 2002/2003 4 December 18th, 2007 07:20 AM
Form closing bschleusner C# 2005 2 February 4th, 2007 04:07 PM
How to refresh owner form on closing of child form akumarp2p C# 2005 0 December 22nd, 2006 10:27 AM
Preventing user from closing form lizhaskin Access 3 December 21st, 2005 01:01 PM
closing Form kobystud C# 4 July 1st, 2004 03:34 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.