>>Hi,
>>i have a grid on a form (nothing special) which reads a file with an alias ff. I then change that file programaticly by first closing the file using the use command like this:
>>
>>select ff
>>use
>>
>>and then open a new file by using
>>
>>use alltrim(substr(pfpsetup.filename,1,7))+"D" alais ff
>>
>>all the files have the same structer. Then i issue Thisform.grid1.refresh() and the grid goes blank.
>>
>>What am i doing wrong?
>>thanks in advance
>>
>>Quinn
>Hi Quinn.
>
>You might try this:
>
>Thisform.mygrid.recordsource = space(0)
>select ff
>use
>use alltrim(substr(pfpsetup.filename,1,7))+"D" alais ff
>ThisForm.mygrid.recordsource = 'ff'
>
>What is happening here is that you are ripping the grid's recordsource out from under it and the grid has a nervous breakdown. Setting the recordSOurce to space(0) keeps the grid from falling apart when you are doing this.
>
>Marcia
Thats Exactly how I do it. Not only is the grid intact with new data but any formatting, spacing or other properties are preserved for the next table.
You would be well advised, Quinn, to follow this advice rather than RE-setting ALL/Some of the grid properties!
Bernard