First, thanks to everyone who replied.
Ed, your'e right about type() and the array existing first. I ended up with following (thanks to Perry for the _tally tip):
if _tally = 0
laSelCats[1] = ""
endif
which works for me. They way the code is written there is _always_ only one element in the array prior to select not finding a match.
Question though. If I use laSelCats = NULL, won't that screw the reference, same as replace does?
Also Barbara had mentioned problems with _TALLY and arrays. Anyone know what those problems are?
>>Check the Type() value of the item in laSelCats[1,1]. If it's "U" the array is empty. _Tally doesn't work correctly on arrays I've found.
>>
>Barbara, since the array exists already in his example and is scoped as PUBLIC, I think he'd be better off doing something like:
>
>DIMENSION laSelCats[1,1]
>laSelCats = NULL
>
>before the Select, and then check ISNULL(laSelCats[1,1]) afterwards to see if anything happened.
>
-snip-
Roi
'MCP' Visual FoxPro
In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!