... the old method, i.e. by inserting demo data and then in the On INIt of the dialog I refresh the arrays with those created by the dbf and now my statistics functions work the same but I certainly did not understand why oDbf:=TDatabase():Open( , cDir+"lotto", "DBFCDX", .T. ...