Iames, I don't know what your lcTableExpression is but I tried this with a customer table with a field called ID and it worked fine:
************** * Start of Code * Check your lcTableItemExpression is in fact valid. LOCAL lcTableItemExpression, lcTableItem lcTableItemExpression = 'iif(Left(Customer.Id,1)=="A", "Starts with A", "Does Not start with A")' IF VARTYPE( lcTableItemExpression) = "C" AND NOT EMPTY( lcTableItemExpression ) lcTableItem = EVALUATE( lcTableItemExpression ) lcTableItem = IIF( ISNULL( m.lcTableItem ), SPACE(0), ALLTRIM( lcTableItem)) ENDIF Thisform.Caption = lcTableItem * * End of Code ************** Try and substitute and actual expression (Macro Subst) for the evaluate and see if that works first, but I think the problem will lie in the Evaluate such as accessing a different datasession or variable that it cannot see because of scoping. Dave Crozier -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Iames Pizzoli Sent: 04 August 2009 10:32 To: Lista ProFox Subject: VFP9 SP2: Form caption strangeness Hi all, I hope someone can help me, 'cause this is driving me nuts! I have this grid, in AfterRowColChange event method the code is: --- LPARAMETERS nColIndex SET STEP ON LOCAL lcTableItemExpression, lcTableItem lcTableItemExpression = Thisform.icTableItemExpression IF VARTYPE( lcTableItemExpression) = "C" AND NOT EMPTY( lcTableItemExpression ) lcTableItem = EVALUATE( lcTableItemExpression ) lcTableItem = IIF( ISNULL( m.lcTableItem ), SPACE(0), ALLTRIM( lcTableItem ) ) ENDIF Thisform.Caption = lcTableItem <--- *Thisform.Refresh() DODEFAULT( nColIndex ) --- I can see in the debugger what lcTableItem becomes, and it correctly matches the value in the new row I'm, after the move from the previous row. Now, at the '<---' line I should see the form caption change accordingly, right? Well, it doesn't!!! It stays the same. I tried, out of despair, a form.Refresh(), as you can see, but no change. I can't see why it shouldn't work as it is. Any idea? TIA Iames -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f Sponsor: RIVIERA PARK HOTELS: * Cerchi un hotel per visitare i parchi della Romagna ? Oltremare, Aquafan, Mirabilandia e Fiabilandia ti aspettano. Scegli un RivieraParkHotels per la tua vacanza a Riccione. Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=9395&d=4-8 [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/963fb5966ce5406cbfb0a198d5eb8...@develop ** 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.

