Subject Re: applylocate not working
From Ken Mayer <>
Date Fri, 7 Jun 2024 08:03:54 -0700
Newsgroups dbase.getting-started

On 6/7/2024 7:43 AM, Charlie wrote:
> I thought this would be easy since I have done this before but the apply locate is never found.  tgrade is what i am trying to find.  actually it represents a field in the table.  so that isn't the problem (yet) because this never finds tid and cat which are also strings.
> i have tried this looking for bith variables and only one which certainly should have been found, but for some reason the applylocate doesn't work.
> Can anyone help?

Have you considered the locateOptions? Are you perhaps looking for a
string that is not matching based on case? What about length?

Adding the statement:

co.locateOptions := 3 // ignore case and length

The default is to match case, and match the length of the values you are
looking for. There are other options, see help for "locateOptions". I
have shown the best place to add this below:

>   function COMBOBOX4_onChange()
>            co = form.coins1.rowset
co.locateOptions := 3 // ignore case and length
>            tgrade = trim(form.combobox4.value)
>                 tid = trim(form.entryfield5.value)
>                 tcat= trim(form.combobox2.value)
>                 //co.applylocate("year= '" + tid + "'")// and category= '" + tcat + "'")
>                 co.applylocate( "year= '" + 'tid' + "' and category= '" + tcat + "'")
>                 form.entryfield1.value = val(co.fields["&tgrade."].value)
>                 //if found()
>                    msgbox( ""+found() )

*Ken Mayer*
Ken's dBASE Page:
The dUFLP:
dBASE Books:
dBASE Tutorial:
dBASE Web Tutorial:
dBASE DOS to Windows Tutorial:

Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0