I cannot seem to create an evaluate string which will set/clear a
control source. Yet it I do it directly with code it works.
This is needed since the user will be naming/deleteing the fields on a
massive form. I don't know the name of the field until the user
creates the field and names it. This ia also done on three subforms.
All fields will stay on the form be to be reused.
This is an example of a field the the user want to delete
dim ThisForm as string
dim ThisField as String
dim StrEval as gtring
ThisForm = "Forms!frmExpenseSub!" ' depending what form the user is on
ThisField = "e122222" ' depending on what field the user
deletes
Open the form in design view through code
strEval = "ThisForm & ThisField & ".ControlSource = ''" ' Clear the
control source
Eval(strEval) ' Now Do it
' No effect above
yet in the debug window
?strEval
Forms!frmExpensSub!e122222.ControlSource = ""
then run it - works
Thanks