Requery a subform (1 Viewer)

dkkirk2000

Registered User.
Local time
Today, 06:36
Joined
Jan 27, 2017
Messages
16
Hello, I need help with a subform. I have filters and I can clear the filters but the subform stays on the last records that were filtered. How can I get the full list of records back?
Thanks in advance!
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 12:36
Joined
Jul 9, 2003
Messages
16,364
You probably need to requery your subform window. (It's not really a subform window it's called a subform/subReport control) the code would look something like this:-

SubFormWin.Requery

Where "SubFormWin" is the name of your subform/subreport control, a hard to find control which surrounds your subform. It's not part of your subform it's a container for it / around it.

I recently did a YouTube video with an explanation (in a slightly different situation) which should prove useful.

You can see it here:-
https://youtu.be/uchI_ubZrAI?t=05:20

Go to time index 05:20
 
Last edited:

dkkirk2000

Registered User.
Local time
Today, 06:36
Joined
Jan 27, 2017
Messages
16
Thank you so much for your reply!
I watched your videos and I'm doing something very similar to what you have. I have 3 option groups, one subform and a "clear filter" button with this code:

Private Sub Clear_Click()
Me.cboCIname = Null
Me.grpChoice = Null
Me.grpPsdDue = Null
Me.grpWeeklyNotes = Null

Is it possible to have the button clear the filters and requery the subform to get all of the records back. right now it only shows the last filter applied.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 12:36
Joined
Jul 9, 2003
Messages
16,364
I already explained how to do it in my previous post

Sent from my SM-G925F using Tapatalk
 

Users who are viewing this thread

Top Bottom