If I understand you correctly you have a value in a variable p0 and want to put that into a field p0, then the easiest way is GATHER MEMVAR.
To explain macro substitution nontheless, it always starts with a a variable which has (partial) code and is substituted = put into place of incomplete code. You can do as crazy things as this:
Code:
lcMacro = 'een.cap'
_Scr&lcMacro.tion = 'Fox Rocks'
What happens when VFP executes such a line of code with & is, it replaces the variable name with its value. Since lcMacro is 'een.cap', that is substituted into the line, so
Code:
_Scr[b]&lcMacro.[/b]tion = 'Fox Rocks'
becomes
Code:
_Scr[b]een.cap[/b]tion = 'Fox Rocks'
Which then is compiled and executed.
It's far less useful in this case when you already know in advance before compiling that the line will be _Screen.caption = 'Fox Rocks' after macro substitution, then you don't need macro substitution at all and simply write what you want directly. Your cae is one that's a good example, but at the same time it's a bad practice to have a table with p0 to p10 field names. You woukld not need macro substitution if you had 10 records instead of 10 fields, which also has the advantage to be easily extended to 20, 100, 100 0records or just 5 instead of 10 fields.
Chriss