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 VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 26th, 2010, 02:15 PM
Authorized User
Points: 116, Level: 2
Points: 116, Level: 2 Points: 116, Level: 2 Points: 116, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 25
Thanks: 11
Thanked 0 Times in 0 Posts
Default Exit database button to close Access

I have solved the problem. thanks to all who replied.

Last edited by billy1r; March 23rd, 2010 at 01:11 PM..
Reply With Quote
  #2 (permalink)  
Old February 8th, 2010, 05:56 PM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

What would you like it to do instead?
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division
Reply With Quote
The Following User Says Thank You to SerranoG For This Useful Post:
billy1r (March 23rd, 2010)
  #3 (permalink)  
Old February 8th, 2010, 11:34 PM
Authorized User
Points: 116, Level: 2
Points: 116, Level: 2 Points: 116, Level: 2 Points: 116, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 25
Thanks: 11
Thanked 0 Times in 0 Posts
Default Exit Database Button to CLose Access

I would like the botton on the second page to go back to the first page only, not exit the application, which is what it does! To get back to the first page of my switchboard, I have to restart the database.
Reply With Quote
  #4 (permalink)  
Old February 9th, 2010, 08:47 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Bear with me as I understand your switchboard.

Is your switchboard one form that scrolls down to two halves? Are your switchboards two sepearate forms that open? If they are two forms, are they open at the same time or does Page 1 close when you open Page 2?
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division
Reply With Quote
The Following User Says Thank You to SerranoG For This Useful Post:
billy1r (March 23rd, 2010)
  #5 (permalink)  
Old February 9th, 2010, 09:58 AM
Authorized User
Points: 116, Level: 2
Points: 116, Level: 2 Points: 116, Level: 2 Points: 116, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 25
Thanks: 11
Thanked 0 Times in 0 Posts
Default Exit Database Button to Close

My switchboard is 2 separate pages. Page 1 closes when page two opens. There is a button on page two which will take you back to the main page (page 1). Since I added that code, that button also closes the database and exits the application. I have tried taking that code out. But when I do my database doesn't work properly.
I am new at VBA for Access so I don't really understand it all yet although I am studying it at this time.
Reply With Quote
  #6 (permalink)  
Old February 9th, 2010, 10:25 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Open Pages 1 & 2 at the same time but make Page 1 open second so that it's on top of Page 2. Don't close either.

When on Page 1, the button just activates Page 2 and vice-versa

Forms.Page1.Form.Activate

or

Forms.Page2.Form.Activate

Have yet ANOTHER button on each form that closes the whole database separate from the page-toggling buttons.

DoCmd.Quit
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division
Reply With Quote
The Following User Says Thank You to SerranoG For This Useful Post:
billy1r (March 23rd, 2010)
  #7 (permalink)  
Old February 9th, 2010, 10:27 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Oh, and replace Page1 and Page2 in my code for your real form names.

Forms.Your_Real_Form_Name_Here.Form.Activate
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division
Reply With Quote
The Following User Says Thank You to SerranoG For This Useful Post:
billy1r (March 23rd, 2010)
  #8 (permalink)  
Old March 22nd, 2010, 05:50 AM
Authorized User
 
Join Date: Nov 2005
Location: Bromsgrove, United Kingdom.
Posts: 41
Thanks: 6
Thanked 1 Time in 1 Post
Send a message via MSN to RobCarter
Default

Or you could use

Code:
 
docmd.openform "your_page_1", acform
docmd.close acform, "your_page_2", acSaveYes
on the button on page 2. That ought to do it.
__________________
Rob Carter
Reply With Quote
The Following User Says Thank You to RobCarter For This Useful Post:
billy1r (March 23rd, 2010)
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
Access application exit button generate lock ayazhoda Access VBA 1 June 17th, 2008 10:28 AM
access close button Vince_421 Access VBA 3 February 14th, 2007 12:01 PM
Exit or Close Internet Explorer rylemer Classic ASP Basics 1 July 12th, 2006 07:21 PM
Run macro when exit/close excel dgilford Excel VBA 1 September 8th, 2005 02:42 AM
Access Close Button stoneman Access 9 July 7th, 2004 02:53 PM



All times are GMT -4. The time now is 03:51 AM.


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