Subform in subform

D

DB

I have a mainform displaying individual info. I have a subform (form view) on
the main form that displays info for assets. I have a subform (datasheet
View) within that subform that references the same data but only has year
and Asset name -in other words a list of assets. I want to use the list
subform to select the asset and when selected the more detailed asset info in
the formview is displayed.

When I assign master and child properties to the individual IDs it list all
assets and that is what I want it to do. But when I try to set master and
child properties to sync the list subform to the other subform by asset id it
will display only one asset in list form.

Any help appreciated
 
B

Bob Quintal

I have a mainform displaying individual info. I have a subform
(form view) on the main form that displays info for assets. I have
a subform (datasheet View) within that subform that references the
same data but only has year and Asset name -in other words a list
of assets. I want to use the list subform to select the asset and
when selected the more detailed asset info in the formview is
displayed.

When I assign master and child properties to the individual IDs it
list all assets and that is what I want it to do. But when I try
to set master and child properties to sync the list subform to the
other subform by asset id it will display only one asset in list
form.

Any help appreciated
Think a second about which is the parent and which is the child in
the subform and sub-subform.

You will have to do your syncing in a different manner that the link
fields.

You will need some code in the sub-subform's on current event that
issues a findfirst on the subform based on the primary key of the
sub-subform. I suspect that this will result in an infinite loop as
the subform requeries and the sub-subform then requeries, triggering
a requery of the subform ....

A better solution is to move the sub-subform up a level so that you
have the two subforms to the main form.
 
B

boblarson

Actually, this Sub-subform shouldn't be a subform on the other subform
really. It is on the same level as the other subform so it really should be
on the main form and therefore the links could be the same as the other
subform.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com

__________________________________
 

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