Hi Bob.
>> When I change the record source of the grid I am losing
the code in the header click events.
What can I do ? <<
You have a couple of options. Set up a parameterized view and use that as the recordSource for your grid. Then, when you need to change the grid's data, just set your paramter and requery the view. Alternatively, you can set up an updateable cursor in the form's load, bind your grid to that, and when you want to "refresh" its data, just do a SELECT into a temporary cursor, ZAP the grid's RecordSource, and append from the temporary cursor. Personally, I find this a lot more reliable that the old 'set the grid RecordSource to an empty string first' trick.
Marcia
Previous
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