>Hi. VFP7 user. I am working with a grid. I want to say
>
IIF ( EMPTY(fieldA), fieldB, fieldA )
>I tried placing the code in the control source. Got "must be a variable ref" error.
>My q: where can I put this code where it will act on every row of the grid?
A couple of SWAGs, not tested:
- in some cases prefacing with "=" can help e.g. try =IIF( EMPTY(fieldA), fieldB, fieldA )
- you might try wrapping it or replacing with EVALUATE( )
Whenever I've found myself trying to do things like this with grids, I've taken it as a cue to generate cursor(s) on the fly and use them as the grid .RecordSource instead.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up