Hello ICI
You have to read each record from the dbf file into the buffer
Try something like this code
MainFile is string = "FASSETS"
DBRecRead is int = 1
HDBOpen("PLTNEW","X1",ReadinDir+"PLTNEW.dbf")
DBRecCount is int = HNbRec("PLTNEW",hStateAll)
FOR DBRecRead = 1 TO DBRecCount
HRead("PLTNEW",DBRecRead)
HReset(MainFile)
FA.FACode = x1.plant_code
FAssets.Description = x1.descrip
FAssets.PurchaseDate = x1.purch_date
FAssets.PurchaseCost = x1.purch_cost
Hadd(MainFile)
END //for read all records
Regards
Al