This is driving me CRAZY.
I'm revisiting an app I've worked on for a few years, to make some changes.
A form has a textbox (well, many textboxes) whose ControlSource is like
=MyVBAFunction(NameOfSubFormControl.Form.NameOfTextBox)
No problems.
Now I've saved a new renamed version of the form, changed the subform control to refer to a new form. (Subsequently, I've also deleted the subform control, recreated it with its original name, referenced it to the new form - just to see if that would help).
Now the textbox on the main form refuses to get its value - it gets "#Name?". I can't set its Controlsource to the same as in the old version - as soon as I try (in the Properties box), Access sticks its stupid [] around everything, so that I get:
=MyVBAFunction([NameOfSubFormControl].[Form].[NameOfTextBox])
If I open the form, and then set the COntrolSource through VBA in Immediate, like this
ThatMainForm!TheTextBox.ControlSource="=MyVBAFunction(NameOfSubFormControl.Form.NameOfTextBox)"
then I check TheTextBox's Value in Immediate, and - hey presto, it's getting its value. But I can't set the ControlSource to this correct string in Design.
[] around "Form" is incorrect - Form is not a member of the default collection of SubFOrmControl, but aproperty . But Access is insisting on sticking these bloody things around "Form", making my life ____. How can I stop
it doing this? It's Acc 2003 SP3, if that helps.
I've tried using SubFormControl.Form!TextBoxName, with a ! instead of a . - but still the [] appear.
thanks for any ideas!