Just out of curiosity, I wrote code that generates longer and longer expressions:
Code:
Public gnI, x, gcExpression
x = .f.
gcExpression = 'x'
On Error Cancel
For gnI = 1 to 10000
gcExpression = gcExpression + ' and x'
evaluate(gcExpression)
EndFor
Using a short variable name x just to make the expression as short as possible and allowing as many ORs and ANDs as possible.
The code errors and thus cancels and stops when gnI reaches 1366, the expression then has a length of 8197, so clearly the maximum command length limit of 8192 is reached before the complexity limit.
Change that to use OR instead of AND, which generates shorter expressions, it works up to 1639 OR operators and the expression length then is exactly 8196.
When the code stops the status bar message becmes "do cancelled" and you can ? gnI, ? LEN(gcExpression) as those variables still exist as they are define PUBLIC. That's the only reason to do that.
I guess complexity doesn't rise very much with simple sequences of ANDs and ORs, but you'll practically fail in writing out such long conditions without any typo or other logical error before you reach the technical limitation, the limits will also vbe lower as there are only 26 single letter names, ome more if you allow all other characters expect numbers, but you'll not practically have such field names in your conditions.
So there's what you can get from experimenting. realistically with longer field names with 5 to 7 letter words instead of single letters perhaps 500-600 ANDs and ORs can be used, no real practical limitataion, or in other words, the practical limitation occurs earlier than the technical, as nobody would ever write out such long conditions, they're not realistic.
Chriss