Information générale
Catégorie:
Programmation Orientée Object
>>>You need to blank the grid.recordsource to "" before anymodification on the cursor and then put it back to its value.
>>
>>I think you might find that setting the grid's .RecordSource = SPACE(0) is better.
>
>Why?
Not totally sure....this was something I picked up here from UT quite some time ago. If I remember correctly (and that's a difficult thing to do), using SPACE(0) greatly assists in retaining the current grid definition for the columns where setting it to "" destroys them. I will admit it's been a while since I've had to look at the reason why.
I have a self building grid where a programmer populates an array and then calls a method to construct the grid according to the contents of the array. Because it rebuilds the entire definition of the grid, I don't run into the issue of the grid losing it's definition when I create a new cursor for a .RecordSource. I do know that my .BlankGrid method does set it to SPACE(0).
Steve
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement