Subject Re: [IBO] Questions about IncSearching
Author Christian Mautendorfer
>
> >Also it doesn't happen if I have scrolled at least once.
> >
> >Sometimes when I change the active ordering (via searchbar) I also have to
> >press the Button twice.
> >But this only hapens a few times.
>
>
>Then it looks as if the problem *might be* around the positioning of the
>buffer cursor and the timing of your call to qryAdressen.Search. Can you
>do a trace to check the value of the IncSearchKeyString at the time when
>the unexpected behaviour occurs?
>
>I'm reaching for things here, but maybe you need to call IncSearchKey
>rather than IncSearchString, if you are passing only a single character to
>the search. You can pass a Boolean Timeout argument to IncSearchKey. I
>don't know if this is relevant to your case, because I can't tell from your
>description whether each character-buttonclick is intended to create a
>self-contained search argument or whether your code is designed to add a
>character to the search argument on each character-buttonclick.
>
>Helen

Ok, IncSearchKey seems to work great. Thanks.

What I wanted to do is a self contained search.
Press button with caption C and go to the first record that starts with C.
Press button with caption M and go to the first record that starts with M.

Is there any better way to do this?