Problem: Your application displays an error message Error: Referenced control not on current page
Solution: What the error means is that a script on that form is accessing a control that is not on the current page of the form. For example, if you have a multipage form with a control named editName on the second page of the form, and you try to access that control when you are on the first page of the form, that error message will be displayed.
You must take care to ensure you are on the same page as the control you are accessing, by using the forms().currentpage property, eg:
if forms().currentpage = 1 then
'we are on second page (zero indexed) so we can access control
editName = "Jim"
endif
This applies to all scripts on the form, such as AfterOpen, AfterLoad, OnValidate, etc., as well as global subs and functions.
Keywords: error, control, page, currentpage
KB ID: 10013
Updated: 2006-10-02
Satellite Forms KnowledgeBase Online