Thank you very much Michael.Now I learned how to do this.hope this help others too.Maybe renaming it to CreateSQLFromTableStructure or something like this help to find easier in the future needs of others. Ara -- http://www.fastmail.com - Does exactly what it says on the tin