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

2 questions in one 1

Status
Not open for further replies.

rclarke

Technical User
May 14, 2001
78
GB
Hello

hope every body is well

Now I know I must be being thick but in my notorious grid I have it insert two columns using
this.addcolumn(5)
this.addcolumn(6)
the first four columns are there already

Question 1

How do I change the header to say results instead of header1

I have tried this.column5.header1 = "results"

but it basically tells me header1 is an event or object

Question 2

when I click on a row in the grid what is the best way to take the values in that row and put them into a form.

I use the Click event for the grid atm and I say Do resultform with supplier, this.value but this only takes the first column value over.


Help would be most appreciated

Rachel
 
PLease forget first question told you I was being thick I forgot caption of the end that bit works well now but help with the second question would be still very much appreciated

Thanks

Rachel
 
1. The answer for Q1
This.column5.header1.Caption = "results"

2. You can findout the record number of the selected table and use that to collect your information. If the form is built on memory variables, you can use SCATTER memvar.. If you are binding the table fields to the textboxes.. then when you get to the form, locate the record pointer to the selected record number.

ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
ramani

Thanks for your advice

the grid values are actually comng from the following

If testsetheader.tsh_dretiredon <> NULL
messagebox(&quot;this test set is retired please select another one&quot;, 0)
EndIF
SELECT Testdetails.tst_stest AS test, Testdetails.tst_shortdesc AS description,;
Testdetails.tst_ntype AS TestType, Testsetdetail.tsd_iline AS LineNum ;
FROM data1!testdetails INNER JOIN data1!testsetdetail ;
ON Testdetails.tst_stest = Testsetdetail.tsd_stestid ;
WHERE testsetdetail.tsd_sname=thisform.distinct_values_combo2.value ;
ORDER BY testsetdetail.tsd_sName, testsetdetail.tsd_iline ;
INTO CURSOR filterResults

does this affect the way I use this Scatter Command since the grid is made up from two physical tables?

Thanks

Rachel

 
IF you are in doubt as to which table is the current alias.. then..

SELECT filterResults
SCATTER MEMVAR

If this is what you need. The values are as in the field names specified in the SQL with a memory identifier M. infront.

If you want to reach the record number... why not consider.. picking up the key values from 'filterresults' cursor and make a seek in the related table1 or table2.

You can also think of picking up a.RECNO() AS aRecNo, b.RECNO() AS bRecNo in the SQL above and use those value to reach the relevant record numbers in the parent table.

The choice is yours.. everything should give you the result.

ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top