Hi Tracy, Thanks for your reply.
(goapp.cFilterVisibility) gives 'Function argument value, type...' As for x = goapp.cFilterVisibility and using &x, the problem is that x will not exist later when the view needs to be instantiated. Obviously, I could resort to PUBLIC vars but I've been avoiding those in favour of my 'goapp' global object. Thx Henry -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Tracy Pearson Sent: 2009-04-02 2:03 PM To: [email protected] Subject: RE: Macro Substitution using object/property in SQL You are unable to macro substitute an object or cursor. You'll need to put the goapp.cFilterVisibility value into a temp var. tmpAnd = goapp.cFilterVisibility Select ... WHERE <something> And &tmpAnd. But, have you tried Select ... WHERE <something> And (goapp.cFilterVisibility) -----Original Message----- From: [email protected] Sent: Thursday, April 02, 2009 1:59 PM Hi all, I use this SQL to create a local view (VFP 9). I need to apply a global filter (say, to limit results to gender = 1) goapp.cFilterVisibility = 'Gender = 1' Select ... WHERE <something> And &goapp.cFilterVisibility This is generating an error (Missing Operand) I've tried Select ... WHERE <something> And &goapp..cFilterVisibility This also generates (Missing Operand) And Select ... WHERE <something> And Evaluate(goapp.cFilterVisibility) This yields no error but does not filter on gender Can anyone please help me with the proper syntax to add this global filter to my MANY local views? Thanks, Henry [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** 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.

