Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

returning to forms..

Posted on 1998-08-05
3
Medium Priority
?
170 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 200 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

972 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