Try to open Filename.dbf from the command window to make sure that the problem isn't in Filename.dbf table or it's indexes.
>No that's not it! After adding the function if.prg I found out that if.prg is called at a line like: "USE (File1) IN 0 ALIAS Table1" where File1 = "Path\Filename.dbf"
>
>Thankz.
--sb--