function (MyControlName as ???)
Forms!MyForm!MyControlName = "whatever"
end function
Thanks
That won't work with subforms, since the subform is not open in its own
right (i.e. it is not in the Forms collection.) Consequently, it might be
better to pass a reference to the control itself instead of using the form
and control names:
Function AssignToControl(ctl As Control, varValue As Variant)
ctl = varValue
End Function
And use it like this:
Call AssignToControl(Me.Text0, 99)
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"waynemb" <way...@discussions.microsoft.com> wrote in message
news:52CAB466-C7EB-4C36...@microsoft.com...