Subform Synchonization Problem

D

DFP

My application is in Access 2003 with SP 3 applied. I have a form that is
opened by a Command Button Click event procedure. The form contains 3
subforms that need to be synchronized. The layout of the form is as follows:

Form-A
Subform-1
Subform-2
Subform-3

The view of the 3 subforms is Continuous Forms. Subform-1 is linked to
Form-A via the LinkChildFields and LinkMasterFields properties in Subform-1.
There is one data element used in this link. Subform-2 is linked to
Subform-1 via the LinkChildFields and LinkMasterFields properties in
Subform-2. There are two data elements used in this link. Subform-3 is
linked to Subform-2 via the LinkChildFields and LinkMasterFields properties
in Subform-3. There are two data elements used in this link. Subform-1 and
Subform-2 both have OnCurrent event procedures that execute the Requery
method for the next subform as the user can select a different record and see
the details of the other subforms change. Form-A, Subform-1, and Subform-2
all display the correct data. However, Subform-3 has a problem synchonizing
with Subform-2. When both data elements are set in the linked fields
properties of Subform-3, no data is displayed in Subform-3. If I only set
one of the two elements in the linked fields properties of Subform-3, data is
displayed, but not filtered as I need it. The same thing happens when I set
the linked fields properties of Subform-3 to the other data element. In the
link fields properties the element names are separated by a semicolon, they
are in the correct sequence, and the names are spelled correctly. I know
that the synchonizing concept I am using is sound as I have another form with
3 synchonizing subforms in this application that works correctly. I cannot
see what I have done wrong here. I have rebuild the subforms from scratch
just in case I had something hung up in Access, but that did not help.
 
J

Jeanette Cunningham

Hi,
the problem could be with the recordsource for subform 3.
Are subform 2 and subform 3 based on the same table? this could cause a
problem.

One way to try to see what is happening is to work on a copy of the form.
Remove subform 3.
Have a saved query which is the record source for subform 3.
Open the form and choose a record in subform 2, now open the saved query and
see if you can find the matching record in the query that matches the
selection in subform 2. If there is any problem choosing the matching
record, you can spot it here.

Jeanette Cunningham
 
D

DFP

Thanks Karl! I didn't realize that there were so few data elements that
matched the search criteria. Dug into the database and found the correct
data combinations to test against and lo-and-behold--it works without any
changes.
 
D

DFP

Thanks Jeanette! I tested the query and it's my lack of understanding that
there were so few data elements that matched the search criteria. Dug into
the database and found the correct data combinations to test against and
lo-and-behold--it works without any changes.
 

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