Expand / Collapse a subform record

kenb214

New member
Local time
Today, 19:22
Joined
Oct 3, 2010
Messages
7
Hi,

I am relatively new to Access. I am using Access 2003.

My problem is that I have a form (form1) with a subform (sub1) and located in that subform is another subform (sub2). When I open a record in form1 the fields in sub2 which rely on info from sub1 displays #Error.

The #Error disappears when I expand then collapse that each individual row in sub2 (using the +/- button at the left hand side of sub2).

This is obviously time consuming considering every form record can have 50 rows - I was wondering if there is some code which would allow this to automatically expand / collapse when the form record is opened?

Thank you in advance.

Regards,

Ken
 
what may be happening is that one of the subforms may not be loading data, or requerying correctly when you change the record in form1.

does the info in sub rely on form1's record? Check to see if the master fields and child fields are linked between sub1 and sub2. If they are not, link them. They will not be available to be linked though, if they are not related one-to-many.

But it sounds like your setup has two one-to-many relationships and that they should be Inner Joined.
 

Users who are viewing this thread

Back
Top Bottom