Hi Greg,
First, there'a no need for macro substitution in this case. W/o it code is simpler and readable
cPicture = sys(5)+curdir()+'RADIOGRAPHY\'+padl(cUser,8,'0')+'\'+ ;
ALLTRIM(EVALUATE(radio.r_image'+tran(nCounter)))
STORE cPicture TO ('thisform.imgPicture'+tran(nCounter)+'.picture')
Try code above and if it doesn't work, tell what exactly doesn't work? Do you get an error or what?
>
>I am trying to assign the name of a picture at run time based upon a selection made by the user.
>
>This code works:
>nCounter=1
>cPicture=sys(5)+curdir()+'RADIOGRAPHY\00000001\000001000006.jpg'
>cMacro='thisform.imgPicture'+tran(nCounter)+'.picture="'+cPicture+'"'
>&cMacro
>
>This code does not :-(
>nCounter=1
>cUser=1
>cPictureName='radio.r_image'+tran(nCounter)
>cPicture=allt(&cPictureName)
>cPicture=sys(5)+curdir()+'RADIOGRAPHY\'+padl(cUser,8,'0')+'\'+cPicture
>cMacro='thisform.imgPicture'+tran(nCounter)+'.picture="'+cPicture+'"'
>&cMacro
>
>
--sb--