Str: = Table1.TableName;
Query1.close;
Query1.sql.clear;
Query1.sql.add (Format ('SELECT * FROM% S', [STR]));
Query1.open;