var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Changing Control Source on a Form
I have created a form that captures data regarding a certain program. I need to create that exact form for other programs as well that save to different tables.
I copied my initial form and renamed it to reflect another program. Now I'm trying to change the control source to point to a different program table than my initial one.
What is the easiest way in Access 2010 to change the control source for all of these fields without having to rebuild the form every time?
If you only need to change the RecordSource of the form, it's easy:
For changing the control source you need to have a list somewhere (in a table, an array, ...) containing the names of the column of the data source. You can then use (here for text boxes):
Me.RecordSource = ...
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Then ctl.ControlSource = "<Something>"
Have a nice day!