Form and Requery Question

rhett7660

Still Learning....
Local time
Today, 08:56
Joined
Aug 25, 2005
Messages
371
I have two forms that have a link to open the same form.

IE
Test taking Form
Survey Form

they open up this form: Update jobtitle form

Both the test taking and survey forms have a button that opens up the jobtitle form.

I have it set when you close the jobtitle form that it requeries the test taking form so that it updates the combo box on the test taking form.

I would like to be able to use the same form, jobtitle, for the survey form also. But how do I have it requery the survey form without getting the error for the test taking form not found?

I know it is probably going to be an iff statement but that is all I know...lol...

Right now I have it setup so that there is jobtitle1 and jobtitle2 form, I would like to only have one form.....

Does this make sense?

Thanks
 
Last edited:
There are a few ways to do this.
1) In the open event of the jobtitle form save the parent of the Screen.PreviousControl, which will be the calling form. Requery it when you're done.
2) Put a public form varaible or property on the jobtitle form. When the button is pressed on the calling form, open the job title form AND set the public variable with a reference to the calling form.
3) When you close the jobtitle form traverse the forms collection and requery every open form that might need to be requried based on the changes in the job title form.
 

Users who are viewing this thread

Back
Top Bottom