>>>After I viewing table in a grid, switching sourcecode from one table to an SQL result, then returning the sourcecode back to the original table I have lost the Grid.Column3.text1.dblclick code.
>>>
>>>How do I re-instate the dbl click for this?
>>
>>Before you pull the rug out from under the grid by changing the RecordSource, do this:
>>
>>cOldRS = thisform.oGrid.RecordSource
>>thisform.oGrid.RecordSource = ""
>>* get your new data here
>>thisform.oGrid.RecordSource = cOldRS
>
>Thanx,
>But actually the restablished record source is not the problem.
It is - because once you remove the rug (recordsource) from beneath the grid's legs, it destroys all of its columns and rebuilds it with blank default columns as soon as it gets new recordsource.
>I have code in the third column text1 double click that is cleared
You can either reestablish your textbox by having it as a class (advice you already got), or keep a readwrite cursor as a recordsource (one you would create yourself, to have the proper fields), and then instead of selecting into that cursor, select into another one, then zap your grid's cursor and append from dbf("tempcursor"). This trick will have the same effect - you're getting a new set of data for your grid - but won't cause the grid to autorebuild.