>Ok, my turn to ask for help. But first a short quote from VFP help:
>
Subject: INDEX ON eExpression TAG TagName OF CDXFileName
>"If a compound index file has already been created and opened, issuing INDEX with TAG TagName
adds a tag to the compound index file."
>Ok, so far I follow. But the problem I encounter is trying to add a tag that has already been added. How do I find the existing tags?
Use the TAG() function; iterate through the tags starting at 1 and going up with each sequental return; TAG() will return an empty string if a tag number beyond the last defined tag for the CDX is passed. Example:
USE MyTable INDEX MyTable.CDX, NonStruc.CDX
nEnumTagCtr = 1
DO WHILE ! EMPTY(TAG('NonStruc', nEnumTagCtr))
? TAG('NonStruc', nEnumTagCtr)
nEnumTagCtr = nEnumTagCtr + 1
ENDDO
You can also iterate a FOR loop up to TAGCOUNT(), but it's only there for backwards dBASE compatibility, and I don't know the syntax for specifying which of several CDXs to return the TAGCOUNT() for.