#Error appears on subform residing on a tab control

J

John

I have two synchronized subforms on an unbound main form and everything
worked great. As you move to each record on sub1, sub2 shows the
corresponding records.

I needed to add a 3rd subform so I moved sub2 to a tab form and sub3 to
another tab and everything still works great. A combobox selection on
the main form populates sub1, then sub2 populates with corresponding
records to sub1 and sub3 populates with corresponding records to sub2.
It's just that now when the main form opens, sub2 shows #Error until
sub1 has been populated giving the user the impression that there is a
problem.

After numerous hours of research, I found that the error only occurs
where a subform is linked to another subform on a tab control. Links
between subforms that are on the same main form or the same tab control
do not display this error. If I move sub2 back to the main form the
error goes away but them sub3 displays the error.

I was under the impression that there should be no difference in
functionality whether a subform resides on a tab control or not.

Is this a bug or is there a way to correct this?

Thanks!
 
D

david epsom dot com dot au

Don't load sub2 and 3 until sub1 has been populated.

Leave the subforms controls empty, so the form loads
without the subforms.

Then, after the cbo has been selected, set values
for the subform SourceObject property.

(david)
 

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