Gene, Not to beat a dead horse.... While I think these may have been mentioned in various places....
1) It used to be that a Select statement would be optimized by VFP to open the source table again, in another work area, and then set a filter on it. This was a problem when people thought they had a cursor and updated the contents, only to find out they had edited the actual data. So they added a "nofilter" clause that forced VFP to create a new cursor and not use the original approach. 2) I haven't seen any discussion on set relation - which might also do what you want (but I haven't actually tested it so may be wrong.) 3) You can use the browse for .... command (I tended to use this over set filter, especially since I could then use "browse last" as well.) As I recall, this worked the same as set filter but didn't require the literal values that set filter do. 4) Of course, Select is an option - but then you may have to guess if VFP did #1 or if it actually created a cursor and your edits are thrown away when you close it. 5) I can't remember, but did set filter allow you to reference a variable? And, if so, did changing that variable then change the effect of the filter? If so, this might also be an option. Take care, Fletcher Fletcher Johnson fletchersjohn...@yahoo.com LinkedIn.com/in/FletcherJohnson twitter.com/fletcherJ strava.com/athletes/fletcherjohnson 408-946-0960 - work 408-781-2345 - cell -----Original Message----- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Gene Wirchenko Sent: Tuesday, May 14, 2019 3:46 PM To: ProFox Email List Subject: Filtering Oddity Hello: I was looking over a program preparatory to an enhancement. I inserted a debugging browse statement in a branch that I was going to add some error reporting to. The branch, oddly, did not get executed. Dig, dig ... use cwkf set filter to validto>={^2019.01.01} count browse Lots of rows. Oh, the filter needs to be extended. set filter to filter()+" and empty(wfccccd)" VFP: Nice try. (Actually, "Command contains unrecognized phrase/keyword." set filter to (filter()+" and empty(wfccccd)") VFP: Don't be silly. (Same error.) Putting an avaluate() around it does not work either. ("Syntax error.") I do know that I can do f=filter()+" and empty(wfccccd)" set filter to &f but in the heat of debugging, I would prefer just one statement. Is there a way to extend a filter in one statement without retyping the current filter expression? Sincerely, Gene Wirchenko [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/034101d50cc9$d43e4c30$7cbae490$@yahoo.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.