Subject Re: function form_onNavigate(nWorkArea)
From roy price <royprice@royprice.name>
Date Tue, 11 May 2021 06:50:11 +1000
Newsgroups dbase.getting-started

On 10/05/2021 11:53 pm, Mervyn Bick wrote:
> On 2021/05/10 15:24, Mervyn Bick wrote:
>
>>> The field is indexed and named "rec". I deleted the index saved the
>>> table, and then recreated it, to no avail.
>>
>> What is the index expression used to create the index?
>>
>>> I'm confused as to why the syntax for a character field works for
>>> records containing numbers that are over 1000, but not those under
>>> 1000. Should it not work at all?
>>
>> It's working for four character values because these don't need
>> padding to fill the field.  There is, therefore, no problem finding
>> the corresponding value in the second table.
>>
>> It's not working for 1, 2 and 3 character values because the rec
>> fields in the two tables are not padded in exactly the same way.
>
> Some more thoughts on this.  The contents of the rec field itself should
> not be padded at all.  If you have padded the contents it can be removed
> quite easily.
>
> use cactusaa
> replace all rec with ltrim(rec)
> use
>
> use cactusaatext
> replace all rec with ltrim(rec)
> use
>
> Recreate the index
>
> use cactusaa exclu
> index on right(space(4)+trim(rec),4) tag rec //or whatever you named the
> index
> use
>
> use cactusaatext exclu
> index on right(space(4)+trim(rec),4) tag rec //or whatever you named the
> index
> use
>
> Mervyn.

Hello Mervyn,
I don't understand your latest thoughts......as the fields in both
tables were changed to numeric when I created the Form that combined the
Gridcolumnindexchange, and image lookup from a directory.
I subsequently added step by step all the code from that Form to the
Seeker  Forms that you created (with my tables) to end up with the
current problem.
That's why I'm confused, as the syntax for a character field is
operating on a numeric field in the table, which shouldn't work at all,
but works for over 1000.
Regards
Roy price