Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing property from one form to another form

Status
Not open for further replies.

jerold

Programmer
Aug 30, 2000
52
PH
I have this form1 and form2. One cmdbutton.click of my form1
run this code <do form form2>. Then the form2 has cmdbutton.click that do some filtering on a table which is in the dataenvironment of the form1.Upon finishing this code it releases <thisform.release>.
My problem is how would I perform a refresh on the form1 so that I could see the filter changes.
Please help me.

Thank you.
 
Just refresh Form1 before you release Form2

Note: reference to form1 by filename, not form name

***************

Form2_Unload
Form1.refresh
Retu [sig][/sig]
 
Hi jerold,

My problem is how would I perform a refresh on the form1 so that I could see the filter changes.

If form2 places a filter on the table, when control returns to form1, the filter will persist unless you SET FILTER TO to remove the filter. So form1 will recognize the filtered table.

If what you are really asking is how to refresh the data in a grid contained on form1, just call the grid's requery method.
Example:

DO FORM1 && form with grid containing data from the table

PROCEDURE FORM1.CommandButton.Click()
DO FORM2 && as long as it's modal
THISFORM.Grid.Requery()
ENDPROC [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>Carpe Diem! - Seize the Day![/sig]
 
Sorry......that should be Refresh.

Have you ever had one of them days where it seemed like everything went wrong??? Should of stayed in bed today. TGIF!! :) [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>Carpe Diem! - Seize the Day![/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top