>When a long SQL statement is ussed VFP returns SQL too long. Is there a system variable to increase the lenght to this.
If the problem is the complexity of the WHERE clause, you may be able to adjust the setting of SYS(3055), otherwise, it's a matter of the overall size of the compiled line.
If this is an error you receive from the View Designer, there are limitations in what the native View Designer can do, and you might want to download Erik Moore's eView from the Files Section here on UT.