>>>I want to call...
>>>set order to tag sorttemp...
>>>I will not know if there is a sorttemp out there.
>>>How do I check if the TAG exist?
>>
>>Robert,
>> Try this...
>>
>>FOR nCount = 1 TO 254
>>
>> IF !EMPTY(TAG(nCount)) && Checks for tags in the index
>>
>> IF UPPER(TAG(nCount)) = 'THISTAG'
>>
>> WAIT 'TAG Found!!'
>>
>> ENDIF
>>
>> ELSE
>>
>> EXIT && Exit the loop when no more tags are found
>>
>> ENDIF
>>
>>ENDFOR
>>
>>Thanx!
>>
>>Tony Miller
>>Vancouver, Wa
>
>Works Tony - thanks... : ))))))
Another solution (and probably faster) is to trap errors and attempt to set the order to
mytag. If this operation fails then your own error handling routine can record the error, respond, etc.
x = on('error')
on error lnErr = error()
lnErr = 0
set order to tag (y)
on error &x.
if lnErr != 0
endif
I used this for dynamic indexing. If setting the order failed, I indexed the column on the spot.
HTH,
Peter
Peter Stephens
Visual Records, Inc.
Lead Programmer for the general purpose record keeping system Visual Records. Written primarily in VFP 6.0 with a little C++.