Information générale
Catégorie:
Codage, syntaxe et commandes
>>Does not work:
>>
>>
>>seek &Thisform.cSeekValueRef
>>
>>
>>Does work:
>>
>>
>>lcSeekValueRef=Thisform.cSeekValueRef
>>seek &lcSeekValueRef
>>
>>
>>Am I correct? Why is it this way?
>Just to answer the general question, you can only macro-expand variables, not fields or properties.
I have used macro substitution with table.fields -->
lcAlias = ALIAS()
REPLACE &lcAlias..fieldname WITH lcValue
The key here is that you have to use two periods (..) -- the first ends the macro substitution, the second separates the field name. I have used this for passing a table reference to a UDF where the table alias may be different/unknown at runtime (generic UDF).
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement