Information générale
Catégorie:
Codage, syntaxe et commandes
>> That works, however, when I set the recordsource a second time, I lose all my property settings for the grid. Do you know why the grid control assumes you want to return to default property settings everytime you set the recordsource after init? For example, I have checkbox controls for the first four logical fields, or font settings and width of column settings. When I set the recordsource a second time while the form is running, it looks as if it is a brand new grid control loaded from a table with default properties. Do you know how to prevent this from happening?
>
>You need to do things in the right sequence...make sure you set grid.recordsource = '' BEFORE doing any requerying on the cursor. Like:
>
>grid.recordsource = ''
>select ... into mycursor
>grid.recordsource = 'mycursor'
>
>Is this the way you're doing it?
I wasn't before but I tried it and the same thing happened. But, now I am using a temporary table
instead of a cursor and the behavior has changed. Some properties are kept and different ones go away with a table rather than a cursor. I'm trying some different things, I'll let you know when I find out what's happening.
Eric K.
Précédent
Suivant
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