>>Hi,
>>
>>I'm using a function to add and Grid object on my form called myGrid.
>>I'm using the ALIAS of SQL statment as the RecordSource of myGrid and RecordSourceType = 1.
>>
>>In my program I need to modify my SQL statment and re-display myGrid.
>>This should be quit simple, however as soon as I modify the SQL and re-assign the result to myGrid, it freezes.
>>
>>Any ideas
>>
>>antranik
>
>.Recordource=''
>*Build your SQL cursor
>.RecordSource = 'SQLCursorName'
>
>Cetin
BTW this assumes you would like to keep current format of grid. If that's not what you want :
.Recordsource = ''
.ColumnCount = -1
*Build your SQL cursor
.RecordSource = 'SQLCursorName'
If SQL is static except its parameters you could use SQL recordsource as well.
Cetin