UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Filtered Subforms, Access 2016    
 
   
Consonanza
post Jun 22 2019, 11:04 AM
Post#1



Posts: 160
Joined: 1-June 10



I have a form (frmVideoRecordings) containing a subform (sfrmVideoRecordings) which itself is in form view (as opposed to datasheet view). The subform allows me to filter the rows when editing data.

An annoying feature of this is that when I return to a form in which the subform has been previously filtered, the filter is still in place and unless I spot this , I sometimes forget and work under the assumption that there are less records in the subform than is correct.

I understand that that the default state is that the filter is retained in the subform when moving away from a record, so is there any way I can use code to always leave the subform in an unfiltered state when I move from record to record.
Go to the top of the page
 
theDBguy
post Jun 22 2019, 11:42 AM
Post#2


Access Wiki and Forums Moderator
Posts: 75,730
Joined: 19-June 07
From: SunnySandyEggo


When you say move from record to record, I assume you mean the main form, correct? If so, you could try this in the main form's Current Event:
CODE
Me.SubformName.Form.Filter = ""
Me.SubformName.Form.FilterOn=False
Hope it helps...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
Consonanza
post Jun 22 2019, 03:45 PM
Post#3



Posts: 160
Joined: 1-June 10



Yes, I did mean when I move from record to record on the main form. Your suggested code does the trick.

Many thanks DBGuy !
This post has been edited by Consonanza: Jun 22 2019, 03:45 PM
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    22nd July 2019 - 08:52 AM