Arne,
Exe and prg might not have the same environment. Are you sure you're using the same table in both?
messagebox( dbf() )
should show it.
PS:
replace &tVar ...
and:
replace (tVar) ...
are not the same thing.
You should use the latter as:
replace (m.tVar) ...
Cetin
>I haven't tried this yet but:
>
>a) wouldn't it throw an error if we try to replace a non-existant field?
>and
>b) why would it work running the PRG/form but not the EXE?
>
>the solution has to be releated to the EXE version specifically. Does anyone know of a bug related to named references or macro substitution under VFP6?
>
>-Arne
>
>>Please leave it without any macro substitution at all :)
>>
>>Maybe the wrong table is selected? Add the IN clause to the replace.
>>
>>
>>REPLACE (TVar) WITH "AO" + cOrder + cLine in tableName
>>
>>
>>Perhaps (for testing purposes) you should add a BROWSE right before that command, so you can see the table (and record) that is currently selected.
>>
>>
>>>
>>>thanks for the response; unfortunately, I have tried that as well with the same result. I have also tried to execute the entire command via macro substitution like:
>>>