Subform listbox records don't reflect master/child link

M

Mart

This because the subform needs to recheck what it should
be looking at.

You will need to requery the subform by code or try using
changing your qryContactInfo to have 'forms!
[Organizations]![OrganizationID]' in the criteria of the
OrganizationID field.

As this has been posted in the 'getting started' section I
won't post the code up but should you need it yell.

M.
-----Original Message-----
Access 2002. I have a form linked to a subform by the fields
OrganizationID. The subform shows Contacts, and has a listbox, which is
used to select a particular contact for that form and forms below the
Contacts form.
Link Query
Organizations form OrganizationID qryOrganizations
Contacts subform OrganizationID qryContactInfo

Contacts
listbox qryContactInfo
 
M

Monte Grant

Thanks for your help with this.

I applied the statement (which seems right) but it didn't change the result.
Cycling the parent "Organizations form" does not alter the records in the
subform listbox. After adding the statement to the listbox recordsource,
the subforms of the listbox's form no longer respond to a selected row in
the listbox. This is the function of the listbox, set up with the wizard.

Nick


Mart said:
This because the subform needs to recheck what it should
be looking at.

You will need to requery the subform by code or try using
changing your qryContactInfo to have 'forms!
[Organizations]![OrganizationID]' in the criteria of the
OrganizationID field.

As this has been posted in the 'getting started' section I
won't post the code up but should you need it yell.

M.
-----Original Message-----
Access 2002. I have a form linked to a subform by the fields
OrganizationID. The subform shows Contacts, and has a listbox, which is
used to select a particular contact for that form and forms below the
Contacts form.
Link Query
Organizations form OrganizationID qryOrganizations
Contacts subform OrganizationID qryContactInfo

Contacts
listbox qryContactInfo
When I select a contact from the listbox, all of the child subforms display
info only related to the chosen contact. The problem is that when I change
records in the parent form "Organizations," this does not change the list of
contacts in the Contacts listbox. Contacts from the previous record
(Organization) continue to show.

I think this is because the listbox recordset is not being filtered based on
the master/child link. Do I need a separate query for the listbox? If it
requires a statement under criteria, what would it be?

Nick



.
 
N

Nick Mirro

Same guy, different machine : )


Monte Grant said:
Thanks for your help with this.

I applied the statement (which seems right) but it didn't change the result.
Cycling the parent "Organizations form" does not alter the records in the
subform listbox. After adding the statement to the listbox recordsource,
the subforms of the listbox's form no longer respond to a selected row in
the listbox. This is the function of the listbox, set up with the wizard.

Nick


Mart said:
This because the subform needs to recheck what it should
be looking at.

You will need to requery the subform by code or try using
changing your qryContactInfo to have 'forms!
[Organizations]![OrganizationID]' in the criteria of the
OrganizationID field.

As this has been posted in the 'getting started' section I
won't post the code up but should you need it yell.

M.
-----Original Message-----
Access 2002. I have a form linked to a subform by the fields
OrganizationID. The subform shows Contacts, and has a listbox, which is
used to select a particular contact for that form and forms below the
Contacts form.
Link Query
Organizations form OrganizationID qryOrganizations
Contacts subform OrganizationID qryContactInfo

Contacts
listbox qryContactInfo
When I select a contact from the listbox, all of the child subforms display
info only related to the chosen contact. The problem is that when I change
records in the parent form "Organizations," this does not change the list of
contacts in the Contacts listbox. Contacts from the previous record
(Organization) continue to show.

I think this is because the listbox recordset is not being filtered based on
the master/child link. Do I need a separate query for the listbox? If it
requires a statement under criteria, what would it be?

Nick



.
 

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