Solved

returning to forms..

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

920 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

15 Experts available now in Live!

Get 1:1 Help Now