>Ed,
>
>If I use Scan For AllTrim(maindatatable.dmdrno) = AllTrim(This.Value)
>Then if I type in 850 it gives me the first record that dmdrno starts with 850 even though this is not a complete drawing number. How can this be avioded and is this the best approach?
Don't ALLTRIM() either - it also is not optimizable, because you probably don't have an index on the ALLTRIM() of the field. How is the field dmdrno stored in the table? If it's stored as a right justified 8 byte character field, try:
SCAN FOR maindatatable.dmdrno == PADL(This.Value,8)
If it's stored in some other way, you'll have to figure out how to make This.Value match up with the field as far as justification and size.
To get best advantage from Rushmore, you want the table expressions in the FOR clause to match the index expression form used in the indexes in the .CDX
exactly.