That's fantastic Tore, many thanks for sharing.
Tried it & it works a treat
Long live the Fox
>The "safe select" method is the safe method to avoid rebuilding the grid. Since you never change the controlsource, thus no need to regenerate. Try it, it's an extremely helpful solution.
>
>It's quite easy.
>- Select the wanted data into a dummy cursor
>- Select the work are where the cursor that drives the grid is
>- Zap it to remove all records
>- Append new data from the temp cursor
>- Refresh the grid
>
>
>
>>Hi Tore
>>
>>Am I missing something? What is the "safe select" method, I was under the impression that if you zap the file that is the row source that rips the rug from under the grid, and the grid goes blank?
>>
>>>By using the "safe select" method
>>>select cname,type,desc,date,operator,startfinish,transid from wipdata!logfile,operators into cursor tmplog where jobno=wipdata.jobno;
>>>and operator=operators.nempno order by date into cursor CurTemp
>>>Select Tmplog
>>>Zap
>>>Append from dbf('CurTemp')
>>>yourgrid.refresh()
>>>NB! Make sure to add the keyword Readwrite to the select that populates the grid, or you can't zap it.
>>>
>>>>I have a grid on my form, it's row source is a SQL command that create
>>>>
>>>>
>>>>select cname,type,desc,date,operator,startfinish,transid from wipdata!logfile,operators into cursor tmplog where jobno=wipdata.jobno
>>>> and operator=operators.nempno order by date
>>>>
>>>>
>>>>How do I get the SQL command to refire & regenerate the data for my grid?
>>>>
>>>>Many thanks
Rob