>>Hi, How I can to refresh a grid from query ?
>>
>>Thanks for your help.
>
>Basically you need to set the Grid RecordSource = "", then rebuild your cursor from query, then reassign the RecordSource again (and possibly column.ControlSources if your grid layout is customized).
Better solution would be create cursor in form load with create cursor command. Do you select statement. Zap the main cursor and append from this temp cursor (which should be closed after this). This way you don't need to worry about re-construction. This was suggested by Dragan N in Filtered Grid thread.
If you use views, you just do requery and grid will refresh automatically (put grid.Refresh after requery()).
If it's not broken, fix it until it is.
My Blog