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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to refresh the form from two different table? 1

Status
Not open for further replies.

greenilo

IS-IT--Management
Aug 10, 2005
10
0
0
US
Hello,

I have two tables involve in this form. TableA is where my grid is and TableB. Both of them with the same field (invoice no.). How can I refresh the text from my TableB the moment I moved my cursor from my grid? All other text info are refreshing because the source is from TableA. I hope you got my question right.

Thank you.

 
greenilo,

try this....


1st u need a set relation of two table's iusing the invoice fields

sele tableb
set order to tag inv_no
sele tablea
set order to tag inv_no
set rela to inv_no into tableb

in afterRowColChange in a grid in TableA


thisform.GrdTableB.refresh


hope this solve ur prob.

[peace]

 
Hey omr1119,

Where would I put those commands? I tried to put them in the initial event method of my tableb but the error message said "File is in use". Did I do the right thing?

Thanks
 
If you have your tables in the dataenvironment of the form just drag a line from TableA inv_no index to the inv_no index in TableB. This will make TableA the parent of the relationship and TableB the child. Should you want it the other way around, then drag the line from TableB back to TableA.

This will setup the relationship for your tables... then use the code that omr1119 has given you for the afterrowcolchange event of the grid. If you don't need to refresh the whole form then just issue a refresh for the controls you want to display the updated data.

boyd.gif

SweetPotato Software Website
My Blog
 
It Worked!!!! Thank you very much.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top