>>>>>>LPARAMETERS nColIndex >>>>>>DODEFAULT() >>>>>>LOCAL llok, lcclient, laoption(1) >>>>>>lcclient = ccontact.clientid >>>>>>laoption[1] = ccontact.contactid && when I stop it here, the record pointer is still on the first record, not the record I clicked on the grid. >>>>>>THISFORM.cpageframe1.page1.grid2.RECORDSOURCE = "" >>>>>>llok = settables(lcclient, THISFORM.DATASESSIONID, "CRACT", @laoption) && this gets the correct records for the 2nd grid >>>>>>THISFORM.resetgrids(.T.) && this sets the grids back to the correct recordsources >>>>>>SELECT 'crscustmer' >>>>>>THISFORM.REFRESH() >>>>>>>>>>>>
>> lcContact = paOthers[1] >> IF !EMPTY(lcContact) >> SELECT * FROM cract ; >> WHERE client_id = lcClient ; >> AND contact_id == lcContact ; >> ORDER BY date1 INTO CURSOR ccr_act1 nofilter >> SELECT 'ccract1' >> ZAP >> APPEND FROM DBF('ccr_act1') >> USE IN SELECT('ccr_act1') >> ENDIF >>>>I switch between "" and the true recordsource because I am never sure if the cursor is going to break the grid. I can only have one field showing in the grid, and there are 20 fields in the cursor.
>Set safety off >Zap in ccract1 >Set safety on >Insert Into ccract1 Select * FROM cract WHERE client .... >go top in ccract1 >Thisform.ChildGrid.setfocus >Thisform.ParentGrid.setfocus >okay, but the grid definitions is not my problem. My problem at the moment is that I can not get the correct records for the 2nd grid, because contactid is not correct before I even set the 2nd gird recordsource to "". It always stays at the first record for the 1st grid recordsource. It does not move off of it. So my 2nd grid does not change to different records, it always has the same records.