while filtering main form subform also gets filtered

Naqibullah

Registered User.
Local time
Today, 15:28
Joined
Feb 7, 2013
Messages
86
Hi Dear friends and colleagues!!
Hope my greetings find each one of you healthy and successful, i have faced with a problem while i was filtering my main form.....my problem is when i filter the main or parent form the related sub-form also gets filtered how to manage the main form so that when i filter it the sub-form should not be filtered so that i can get the related record to my filtered one in the sub-form... as for the time being when i filter the main form the related record in the sub-form is not shown and when i press unfiltered on the sub-form its data gets appeared....
thank you all in advance
 
For me, the subform is a form filtered. Otherwise, i dont see the point for a subform. Also, i think that your subform doesnt show records becouse the primeri filter for the subform (i am sure that there is a filter) returns no values for the filtered records in the form.
 
Maybe a sample of your db will clear us more.
 
Assume i have a school servey form, this form has two subforms election threats form and election incidents form... i already have a number of schools entered in my database now if i try to filter school main form for a specific record i should get that specific record and its related data also should appear in the two tabs which are election thread and election incident but when i filter the school form two other forms also gets filtered and i cant get my entered data related to the school servey form which is already entered and when i press unfiltered command in the sub forms, then the related data gets appeared
if was not useful i will upload my db tomorrow morning
thanks in advance
 
The Sub Form should show all records that match the Master Child properties for the Sub Form.

What do you have at the moment.
 
Yes you are very correct....but when the master form is filtered, the sub-form also gets filtered and i can't see records related to my master record, and when i press unfiltered button on the sub form the records related to master record gets appeared on the sub form
 
I assume you only show one record in the main form at a time.

Is this correct.
 
Yes, i want to show one record on the main form at a time and i may modify the sub form records related to the main form record
 
That being the case why do you have Filters. What do they do.
 
ok plz let me attach my db sample
go to school servey then filter master table by a specific incident number then check the tab election relates incident, you will not see any record for that master table record, now go down of the sub form tab and press unfilterd command of sub form then u will see data gets appeared on that election relateds incident, i want that when i filter master table by a specific incident number related record on the subform should automacially appear..
thanks
 

Attachments

I only have Access 2003

Can you post the Full code of the SQL that turns the filter on or off. Please include the heading and all the way to the end.

From what I have read this must be the problem. But I could be wrong.
 
I've looked at your db and everything seems to be ok. I have no problems seeing the ElectionRelatedIncidents. If you think you have a problem becouse on the record 1 on the main form you dont see any records on the ElectionRelatedIncidents, well, that is becouse there is no such incident related with the id on the main form.
 

Users who are viewing this thread

Back
Top Bottom