Runtime Filter procedure
Posted on 1997-05-18
In a D2 program, in a Search routine using a DBGrid tied to any one of several Paradox tables -
I'm writing a generic Search routine to display ONLY those records which match certain criteria. The grid is standard, but the table connected to it could change, so I can't just set the OnFilterRecord event handler of any ONE DataSet (Table).
Specifically, I want to be able to filter the record on more than just the ">,<,=,<>" combinations. I'd like to be able to display a record because it has, for example, the word 'Mixer' in the record's "Description" field.
Bottom line- I need a way to connect a filter procedure (I can handle writing that) to the "OnFilterRecord" event of whichever table is connected to the grid AT THE TIME I'm doing the search...
So- how do I set the OnFilterRecord event handler AT RUN TIME?