Hi Guys,
I should probably re-iterate that S[] is NOT scoped to the procedure. The idea is to use "macro-substitution" to set the control source for one text box on the form depending on which row in the grid is active. The intent is to dynamically set the control source for the text box to S[1,20] if you're on row 1, or S[2,20] for row 2 etc.
This works fine in the case of S[CurrRow,18] (as you can see from the code) but blows up on the other. The only difference between S[n,18] and S[n,20] is that 18 is an edit box and 20 is a text box. I use similar code to set control sources in many other places and always works fine.
-Arne
arne@synercom-edi.com "There are no absolutes but this one."
President, synercom/edi - Event Ticketing Solutions