General information
Category:
Forms & Form designer
Cathy:
Closing the cursor will always kill the grid!
Try this to refresh your grid:
myGrid.RecordSource='myCursor'
myGrid.Refresh()
HTH,
Tom.
>I have a grid on a form that has a handful of columns. Through code, I then add additional columns as follows ...
>
>- Create a temporary cursor for this column
>- set the relationship to the grid's control source
>- Use AddColumn() to add a column with a control source that references the temporary cursor
>- Refresh the Grid
>
>This all functions wonderfully. The problem is when I want to delete one of the columns connected to a temporary cursor. What I have tried is ...
>
>- Use DeleteColumn() to remove the column
>- Close the temporary cursor
>- Refresh the grid
>
>What happens is that all the columns from the grid disappear as if they are connected to invalid control sources. If I comment out the line of code that closes the temporary cursor, everything works fine. The one column I want to delete disappears and the rest remain. But now I have an extra cursor hanging around that I don't need.
>
>I can't figure out why closing the temporary cursor would break the rest of the grid. The only column in the grid that references the temporary cursor is the one I just deleted with DeleteColumn().
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only