Jerry,
this
>if (myvar1 == "") myvar = myvar2; myvar = myvar1;
is the same as this
> if (myvar1 == "") myvar = myvar2;
> myvar = myvar1;
Which means, that "myvar = myvar1" will always be executed.
If you want an if...else construct in a single line code, you might use the following syntax:
myvar = (myvar1=="") ? myvar2 : myvar1;
It's similar to the IIF() function of VFP.
Holger Vorberg
Germany