Hi Sergey
Actually, I apologize, I mistakenly typed table, I actually am creating a cursor. Does the same logic apply? Should I set the recordsource to space(0)
and then reset it after the query? I'll try it that way. One of the reference texts refers to using a view rather than a query and taking advantage of the updates to tables involved with producing the query. Does that make more sens?
Thanks,
Carmen
>
Faq #8019
Grid reconstruction and how to avoid it explains this grid behavior. The simplest fix is to set Recordsource of the grid to the empty string before retrieving a new data and restore it back to the table/cursor name after that.
Thisform.grid1.Recordsource = SPACE(0)
>* recreate table/cursor here
>...
>* Restore recordsource
>Thisform.grid1.Recordsource = "mytable"
BTW, is there any reason that you're creating table not cursor in your select?
>
>
>>When a SQL statement is issued and the results directed into a table, what happens when the statement is run more than once? I have a grid which uses as its source a table generated by a SQL statement. When a record within the grid is selected, another form is launched which works with the data generated by the SQL statement. Upon returning to the initial form, I run the SQL statement again so the grid will reflect the changes made to the data. When I do this however, the grid is blank and nothing is displayed. Have I somehow created a second table when the SQL statement is run again?
>>
>>Thanks in advance,
>>Carmen