Sherry, it's fine putting an SQL in a memo field and executing it later as you are doing, but remember there cannot be any tab characters and especially a line (carriage) return. The most common mistake I've seen is not removing the last line return of the statement. Hope this helps.
Michael Garcia