PC Review


Reply
Thread Tools Rate Thread

Filter the main form based on a subform filter

 
 
bjc3@spinfinder.com
Guest
Posts: n/a
 
      14th Oct 2006
I have 2 tables. One master, one child using Access 2003 (PC)

Have 2 forms. The main form is continuous while the sub is datasheet.

I can filter on the main form and the subform filters with it. No
problem.

My goal is to be able to filter on the subform and have the main form
filtered with it. Thought it would be simple but I for a week solid I
have not been able to solve this on my own. I have review a zillion
websites and still can't find a solution.

Any help is appreciated. Thanks in advance!

 
Reply With Quote
 
 
 
 
John Vinson
Guest
Posts: n/a
 
      14th Oct 2006
On 13 Oct 2006 16:42:53 -0700, (E-Mail Removed) wrote:

>I have 2 tables. One master, one child using Access 2003 (PC)
>
>Have 2 forms. The main form is continuous while the sub is datasheet.
>
>I can filter on the main form and the subform filters with it. No
>problem.
>
>My goal is to be able to filter on the subform and have the main form
>filtered with it. Thought it would be simple but I for a week solid I
>have not been able to solve this on my own. I have review a zillion
>websites and still can't find a solution.
>
>Any help is appreciated. Thanks in advance!


This is difficult *because* of the Subform structure. The subform is
in essence already filtered, to that subset of the records which are
related to the mainform's record; so you don't have the entire table
available to search.

This could be done by dynamically changing the recordsource of the
subform, or (probably better) by using VBA code on some unbound
controls on the subform; the code would open a Recordset based on a
query joining the two tables and search it. This will be dependent on
your actual table structure, and not particularly easy!

John W. Vinson[MVP]
 
Reply With Quote
 
 
 
 
Neil
Guest
Posts: n/a
 
      17th Oct 2006
>>I have review a zillion websites and still can't find a solution<<

Me as well!

If you find a solution, please post it here.

Neil


 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      17th Oct 2006
On Tue, 17 Oct 2006 14:13:50 +0100, "Neil" <sherbaal@ yahoo.com>
wrote:

>>>I have review a zillion websites and still can't find a solution<<

>
>Me as well!
>
>If you find a solution, please post it here.
>
>Neil
>


To repeat:

This is difficult *because* of the Subform structure. The subform is
in essence ALREADY filtered, to that subset of the records which are
related to the mainform's record; so you don't have the entire table
available to search.

This could be done by dynamically changing the recordsource of the
subform, or (probably better) by using VBA code on some unbound
controls on the subform; the code would open a Recordset based on a
query joining the two tables and search it. This will be dependent on
your actual table structure, and not particularly easy!

John W. Vinson[MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Requery main form after subform update and not lose place in main form. Michael Microsoft Access Form Coding 1 23rd Nov 2010 10:26 PM
subform combo to filter based on other subform...technically mainform's other subform records. nospam@thankyou.com Microsoft Access 0 15th Sep 2006 07:51 PM
How to apply a filter on a Subform based on the main form Field Irshad Alam Microsoft Access Forms 6 8th Sep 2004 06:18 PM
Filter a Subform based on Selection in Main form jenni Microsoft Access Forms 3 27th Feb 2004 06:51 PM
=> Open Subform on Main Form initiated by button on Main Form Rhonda Fischer Microsoft Access Form Coding 1 8th Dec 2003 06:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:10 AM.