Mimosa,
You were a little short of the info we need to help you, so to expand on Weedz statement.
There are 2 types of indexes Compound (CDX) and individual(IDX).
The differences are:
CDX - You need to have the DBF file opened Exclusive and sometimes that is not possible. A CDX index is recorded in the header of the database and opend automatically every time you open the DBF. CDX Files will automatically update as you enter records into the DBF.
INDEX ON eExpression TAG TagName [OF CDXFileName]
[FOR lExpression]
[COMPACT]
[ASCENDING | DESCENDING]
[UNIQUE | CANDIDATE]
[ADDITIVE]
IDX - You can create it with a DBF opened shared or noupdate.
IDX files are independent of the DBF.
IDX files WILL NOT open automatically when you the dbf.
IDX files WILL NOT automatically update unless you open them.
IDX files are good for a fast temp order to a dbf that can be thrown away after use.
INDEX ON eExpression TO IDXFileName
[FOR lExpression]
example
USE CUSTOMER order ID shared && there is a CDX on CUSTOMER that was opened
index on CUSTOMER.ADDRESS to C:\TEMP\CUSTADDR.IDX for !deleted()
set index to C:\TEMP\CUSTADDR.IDX
seek "123"
report form xxxx while CUSTOMER.ADDRESS = "123"
set index to
delete file C:\TEMP\CUSTADDR.IDX
press on with life.
Hope this helps you. David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644