Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-07-2015, 04:05 AM   #1
bluenose76
Newly Registered User
 
Join Date: Nov 2004
Posts: 127
Thanks: 5
Thanked 0 Times in 0 Posts
bluenose76 is on a distinguished road
Question Close Form help Needed

Hi,

I have a simple form that has two buttons on it.

Button one closes the form

Button two opens another form

What i would like, is, When i click on button two, it opens the form i want but closes the current form.

Can anyone offer any advice?

Thank you

Rgds
Bev

bluenose76 is offline   Reply With Quote
Old 04-07-2015, 04:09 AM   #2
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,709
Thanks: 2
Thanked 2,075 Times in 2,030 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: Close Form help Needed

In the event for opening form 2, past in the following code.
Code:
DoCmd.Close
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote
Old 04-07-2015, 04:14 AM   #3
bluenose76
Newly Registered User
 
Join Date: Nov 2004
Posts: 127
Thanks: 5
Thanked 0 Times in 0 Posts
bluenose76 is on a distinguished road
Re: Close Form help Needed

Quote:
Originally Posted by JHB View Post
In the event for opening form 2, past in the following code.
Code:
DoCmd.Close

Hi,

Thank you for your reply. I have tried this, however, the issue with this is that when I click on the button, the new form opens and immediately closes but the original form is still there?


bluenose76 is offline   Reply With Quote
Old 04-07-2015, 04:42 AM   #4
jdraw
Super Moderator
 
jdraw's Avatar
 
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 12,071
Thanks: 79
Thanked 2,004 Times in 1,952 Posts
jdraw is a glorious beacon of light jdraw is a glorious beacon of light jdraw is a glorious beacon of light jdraw is a glorious beacon of light jdraw is a glorious beacon of light
Re: Close Form help Needed

see this link and be sure to explicitly identify the form you want to close

Good luck.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jdraw is offline   Reply With Quote
Old 04-07-2015, 06:09 AM   #5
bluenose76
Newly Registered User
 
Join Date: Nov 2004
Posts: 127
Thanks: 5
Thanked 0 Times in 0 Posts
bluenose76 is on a distinguished road
Re: Close Form help Needed

Quote:
Originally Posted by jdraw View Post
see this link and be sure to explicitly identify the form you want to close

Good luck.
That worked a treat,

Thank you

bluenose76 is offline   Reply With Quote
Reply

Tags
button , form

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Needed To Fix Compact & Repair Database On Every 5th Close aamersheikh General 1 11-05-2014 04:44 AM
Slave form won't close from Master Close event nschroeder Modules & VBA 4 01-01-2012 05:50 PM
close form.. add a delay or close after event antonyx Modules & VBA 27 12-01-2006 04:21 AM
Stopping Access Main Window Close W/o Disabling Close Button robert brinkman Reports 1 04-17-2003 01:15 PM
Close Access97 Open Sessions and Then Close Database- new twist llyal Modules & VBA 2 04-11-2000 04:07 AM




All times are GMT -8. The time now is 11:58 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World