Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 6th, 2006, 04:36 PM
Registered User
 
Join Date: Jan 2006
Location: , , .
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.

Reply With Quote
  #2 (permalink)  
Old January 6th, 2006, 05:36 PM
Friend of Wrox
 
Join Date: Dec 2005
Location: , , .
Posts: 142
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

    DoCmd.Close
    DoCmd.OpenForm "frmName"

Reply With Quote
  #3 (permalink)  
Old January 7th, 2006, 04:34 AM
Friend of Wrox
 
Join Date: Dec 2005
Location: CHENNAI, TAMILNADU, India.
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anukagni Send a message via Yahoo to anukagni
Default

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

anuk.p.p
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:50 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.