Solved

returning to forms..

Posted on 1998-08-05
3
161 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now