Filter on Subform Not Displaying as Expected

W

Wayne

I'm filtering a Main form based on a field in the Subform.
I seem to have that working correctly but it displays in an unexpected
way.
I have two contracts with Open Issues. Contract # 1 has 3 Open Issues
and
1 Closed Issue and Contract # 2 has 1 Open Issue. When I look at the
query
results the Main form is based on it shows these 4 Issues with all
details
correctly but when I display them in the form, my Main form shows 1
of 4 records.
As I step through the first 3 records (Contract # 1) neither the Main
form nor
the Issue form changes. It only changes when I get to the 4th record
(Contract # 2).

I was expecting the Issue subform would display a different issue as I
stepped through the Main for records (4 records) but it just shows 1
of 3 records
(displays only the first record in the subform) in the Issue subform
for the all
3 records in the Main form so I am seeing the same information three
times!
OR
I was expecting the Main form to display 1 of 2 records (only 2
contracts have Open
Issues), then I would have to step through the Issue subform to see
the Open Issues
for that contract.

If I use a combo box in the Main form to filter what I see in the
subform, are the
results I am getting correct? I would prefer the Main form to show 1
of 2 records
and the details are in the subform. Is this possible?

Wayne
 
W

Wayne

Wayne -

I would expect the main form to only show the contract information (you have
two contracts, not four), and the subform to show the issues related to the
contract on the main form.  It sounds like your recordsource for the main
form might be a query that includes issues information - you need to change
this to only show contract information.  Then if your subform shows issues,
and it has the proper parent/child links (e.g. contractID), then the forms
should work.

I am not sure what you mean by filtering a main form based on a field in the
subform.  That is backwards to how subforms should work - a subform would
normally be filtered to include only records related to the record displayed
in the main form.  I hope that statement is just a typo...\

--
Daryl S








- Show quoted text -

Thanks Daryl. Yes you're right I was including subform information in
the query which caused the problem.

I have a unbound combo box on the Main form that has Open, Closed and
All as the options. When this is changed I change the recordsource
which includes the Status field on the subform (not displayed, not
checked) so I see only Open issues for example which ends up being the
equivalent of a filter.

Thanks again.

Wayne
 

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