>>Hi everybody,
>>
>>In the form I adapted there is the following code
>>
>>select * from (tcReportName + .RepExt) ...
>>USE IN (tcShortName)
>>
>>where tcShortName is the JUSTSTEM(tcReportName).
>>
>>This code fails when the file name has spaces in it. In my tests I found that spaces are replaced with _.
>>
>>The question is - how can I close reliably the alias opened by selecting everything from the file name?
>
>Since aliases can be used without quotation marks in several contexts (which is a holdover from early days, and has confused me a lot), they must conform to the naming rules for variables. If you just
>
use "something with spaces.dbf"
>or
>
use "1234.dbf"
>it's obvious that the filename can't be the alias, so Fox will make one for you.
>Two ways out of this:
>1) force an alias
>
use "something with spaces.dbf" alias something
>2) accept the alias but save it somewhere:
>
use "something with spaces.dbf"
>lcSomethingAlias=alias()
>
>There's a third way, to guess the rules Fox uses when renaming your unusable filename into an alias, but that's guesswork. At some point it may just switch to aliases like W134, where 134 is its workarea, and you don't know when will that be.
In my tests it was changing spaces to _ and & also to _.
If it's not broken, fix it until it is.
My Blog