Board index » delphi » DBGrid

DBGrid

Help...

    I am using GotoNearest is searching for a record. But I want my
routine to
serach for all possible matches. But GotoNearest always resets to the
beginning
of the ttable and always will only display the first one to match. What
is the code
to search the entire table for all matches.

Thanks

Michelle Brodeur

 

Re:DBGrid


If you are asking how to only display records that match, you will
have to set a filter condition on the table using the Filter and
Filtered property. Something like:

    table.Filter := [MyField] := SomeValue;
    table.Filtered := true;

Woody

Quote
Michelle Broduer wrote in message <361A3C5E.F9591...@geocities.com>...
>Help...

>    I am using GotoNearest is searching for a record. But I want my
>routine to
>serach for all possible matches. But GotoNearest always resets to the
>beginning
>of the ttable and always will only display the first one to match.
What
>is the code
>to search the entire table for all matches.

>Thanks

>Michelle Brodeur

Re:DBGrid


The nearest record is not a match.  It is the closest record that does not
match and there can only be one of those. To find multiple records that do
match use SetRange.

--
Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Other Threads