Subform reference failing

C

Chaplain Doug

Access 2002. I have a main form with subforms. These
subforms reside on tab control pages. On one table
control page I have three subforms. In the "first"
subform's Current event I have the following code which
should syncronize the other two subforms with the first
subform:

Forms![Male Program Records]![Male Progress
subform2].Form.RecordSource = strSQL

Forms![Male Program Records]![Male Progress
subform2].Visible = True

Forms![Male Program Records]![Male Progress
subform3].Form.RecordSource = strSQL

Forms![Male Program Records]![Male Progress
subform3].Visible = True

The first, second, and fourth references work fine, but
the third reference:

Forms![Male Program Records]![Male Progress
subform3].Form.RecordSource = strSQL

Returns an error:

Runtime error '2455'
Youe entered an expression that has an invalid reference
to the property Form/Report

The name of the subform control is "Male Progress
subform3" so I do not know why the reference fails. Any
suggestions? Thanks.

Chaplain Doug
 
C

Chaplain Doug

Solution. The tab order on the page needed to be changed
so that the second and third subforms opened before the
first subform (the first form could not reference the
unopened third subform). Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top