Solved

returning to forms..

Posted on 1998-08-05
3
164 Views
Last Modified: 2010-05-03
i got a search form , a results form and a product and issue form
the search form asks the user what he wants to search
the results form displays the results that match his search
the product form let the user add the product

i want the user to return to the product form after he press the search button on the product form
and he can also return back to the issue form after he press the search button on the issue form

the search button will show the search form -> results form-> product or issue form

how do i know which form the user is on like product or issue so i can return him
to the correct form when he presses the back button...

there is also a main form which has another search button
which calls the same search form but will displays the results
in another form called  view

how do i return focus back to the main form after the user
press the back button on the view form?

i need some working code..
0
Comment
Question by:brohans
3 Comments
 
LVL 14

Expert Comment

by:waty
ID: 1467946
You can know the active form :
     screen.ActiveForm

To make navigation between forms, you could use 2 variables :
    dim frmActual   as Form
    dim frmPrevious as Form

When you navigate, you set the two variables like you want. Doing this, you always know from wich form you coming from
0
 

Author Comment

by:brohans
ID: 1467947
can u gimme some code to illustrate?
0
 
LVL 6

Accepted Solution

by:
anthonyc earned 100 total points
ID: 1467948
Why do you need people to actually DO YOUR PROJECT FOR YOU!
 Man I hate that.

Ok...  

Make a variable, call it g_frmCur  (make it global)

In the issue and product form, in the activate event, set g_frmCur = me

now the search form can reference g_frmCur.name and know where it is.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question