473,405 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Back to previous, but now closed, form

stonward
145 100+
Okay...no one fancied the last one, eh?! Can anyone help with this....I need a piece of code that allows a form to close then reopens the previous form. I'm sure there's a way, but tho' I love coding, I'm not yet that good at it...getting better every day however! Thanx,

Stonward
Aug 6 '07 #1
6 2083
Scott Price
1,384 Expert 1GB
Not sure what the 'last one/post' was, but your general DoCmd.OpenForm "FormName" in the on close event of your form should work...

Regards,
Scott
Aug 6 '07 #2
Rabbit
12,516 Expert Mod 8TB
If you don't know what form is the previous form because there are multiple forms that could open it, then pass the form name in the OpenArgs parameter of DoCmd.OpenForm of the previous form.
Aug 6 '07 #3
stonward
145 100+
Mmm. Sorry folks, not sure I'm getting it. I cant't NAME the form, because I don't know what form the user will have been using previously. So, when the user closes the current form, I need something to enable the form that was open prior to that one to open? Will OpenArgs do this? Can you show me the syntax? Thanks,

Stonward Roy.
Aug 7 '07 #4
Rabbit
12,516 Expert Mod 8TB
OpenArgs won't do this, it only stores whatever value is passed in it.

So let's say you have multiple forms, Form1, Form2, Form3. And they can all open Form4.

Well, when you go to open the Form4 from any one of them, you can use:
DoCmd.OpenForm "Form4", , , , , , "Formx"
where x is the originating form.

Now you have access to that variable using Me.OpenArgs which stores the value of the form. So you can open up the old form using:
DoCmd.OpenForm Me.OpenArgs
Aug 7 '07 #5
stonward
145 100+
Cool!
Thanks, Rabbit.

Stonward
Aug 8 '07 #6
Rabbit
12,516 Expert Mod 8TB
Not a problem, good luck.
Aug 8 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Ralph Freshour | last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP? Thanks...
3
by: Eric Osman | last post by:
Hi, When I run the following html file on netscape, and the button is clicked, the new window pops BEHIND all my other windows. How can I easily fix this html file so the window comes up in...
5
by: Dani | last post by:
Hello everybody, I have some code that disables form elements on body load, but I notice when I hit the "back" button, I need to re-enable the form elements (that is done by clicking on a radial...
8
by: Cheryl | last post by:
How can I create a button that would take me back to the previous form not the previous record, but the previous form that I just moved from using VBA? Any sample code would be greatly appreciated.
3
by: misiek | last post by:
Hi all. I have following scenario: 1. I have a page called Page1.aspx, on which there is some GridView and few texboxes. User can enter some search criteria in textboxes, click Find button and...
1
by: ss | last post by:
Hi I am opening a new form by: ChooseLeve chl = new ChooseLevel(); chl.owner = this; chl.close; i want that when the user clicks on button1 in chl (ChooseLevel), the preiouse form will be...
59
by: Rico | last post by:
Hello, I have an application that I'm converting to Access 2003 and SQL Server 2005 Express. The application uses extensive use of DAO and the SEEK method on indexes. I'm having an issue when...
11
by: Nospam | last post by:
I don't know what it is I am doing wrong, I am trying to get the menus to either expand or contract based on their previous states, i.e if already expanded if clicked again contract, and if...
0
by: sweatha | last post by:
Hello Friends I have created the project with 2 forms. In the first form, I have 2 buttons. The first button has the backcolor as "fusia" by default. If I click the button means then backcolor of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.