>I usually put that in the .BeforeOpenTables of the DE. I have views too complex for the view designer so the CREATE SQL VIEW command is embedded in class definitions. The classes are added in .BeforeOpenTables and there are methods that do the view creation and there is a method to add the view definition to the form's DE. I've also found that I don't need the base tables from which the views draw data from. But I've also found that these base tables are not closed when the form destroys. I may have to include them in the DE.
How can you open the view if the tables for it are not opened?