>Just This....
>
>OPEN DATABASE ".\dados\restaurant" shared
>SELECT codigo,garcom FROM mesas INTO CURSOR openmesas WHERE status = .t.
>thisform.grid1.RecordSource="openmesas"
>
>thisform.grid1.column1.Width= 40
>thisform.grid1.column2.Width= 110
>thisform.grid1.column1.text1.Click
When you set grid.recordsource your grid automatically 'rebuilds itself' losing all customization. You may consider doing it differently. Create empty cursor in Form.Load event and assign it as Grid.recordsource in Grid.Init event, assigning all column.controlsources after it. When it is done, use Insert... Select command in Form.Init event keeping grid properties intact:
Insert Into openmesas (garcom) Select gracom From mesas Where status=.T.
Go Top In openmesas
This.Grid1.Setfocus
Edward Pikman
Independent Consultant