In a VFP form all control object references are held in the Controls() array. I want to build an array that contains references for selected controls on my form. My goal is to be able to clear the ControlSource for selected text box controls and then set them to a saved value later. I can clear them with SetAll(). What I need is an easy way to restore them. I would like to be able to say ThisForm.Controls[nPtr].ControlSource = ThisForm.Controls[nPtr].SavedControl. The problem with that is that my form has multiple pages and it gets messy. I want to create my own array with a hand full of text box controls in it.
My question is how do I store the object's reference into an array?
Thanks!