If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Filter on Subform Not Displaying as Expected
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 |
#2
|
|||
|
|||
Filter on Subform Not Displaying as Expected
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 "Wayne" wrote: 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 . |
#3
|
|||
|
|||
Filter on Subform Not Displaying as Expected
On Apr 22, 7:16*am, Daryl S wrote:
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 "Wayne" wrote: 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 .- Hide quoted text - - 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 |
Thread Tools | |
Display Modes | |
|
|