Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controls in a SubForm

Status
Not open for further replies.

JDU

Technical User
Dec 23, 2002
182
US
I am dynamically changing a field name in a table. This table is bound to a subform. Consequently I have to change the name and controlsource of the textbox in the subform accordingly. I have been successful in changing the controlsource but am having trouble with the name.

The question I have is this. Can I open the form in design view somehow and have it hidden so that I can change the name of the textbox. Also since the name of the textbox changes how can I store it and point to it so that I can change the name of it again.

I tried creating a global variable (glOldName) to store the name of the textbox. However I do not know how to reference it back again. The following code did not work.

Form_frmSchedulingOptions.subfrmPeopleOnCALOrOffForSpecificDay.Form.glOldName = strPeopleOnCALOrOffForSpecificDayDayDate
(new Name of the textbox)

Thanks.
 
Nope. That's the short of it. If you change a field name in the table you need to change all the objects which reference that name. Now there are some global search and replace tools like SpeedFerret.

-------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top