goToControl

  • Thread starter Thread starter judith
  • Start date Start date
J

judith

I always seen to have problems with this. I have a main
form with a sub form and a further sub form within this.
My macro goes off and does its business but I then need
to get back to a field in the first subform to do a Find.
I have the focus up on the main form and do a
GoToControl - name of sub form - The macro stops with
the message ....

There is no field named ***** in the current record

I have tried renaming the sub form object to something
other than the name of the form but to no avail.

Any ideas please. Thanks
 
It might be that you are not correctly referencing subform's control. Use
the following syntax:

[Forms]![MainFormName]![SubformName].[Form]![ControlOnSubform]
 
Back
Top