Remove Filter from a Subform Issue

net

Registered User.
Local time
Today, 01:41
Joined
Mar 12, 2006
Messages
50
Hello,

I cannot get my filter button to remove the filter from my subform. Can you help please.

I am using MSAccess 2013. I have a parent form (frm_WO_Status_Form) with a combo box (Proj Manager) and I am filtering a datasheet subform (subfrm_WO_Status_Form) by user name. This works great!

I have a “Remove Filter” button that when I click on the button I would like the subform datasheet to clear and display all of the records. This is the issue I am having. It does not remove the filter.

I was trying this code, but of curse it is not working.

Private Sub Remove_Filter_Button_Click()

Me.RecordSource = "SELECT * FROM tbl_WO_Master"

End Sub

Appreciate the help.
 
Have you tried to remove the filter?

Code:
  Me.Filter = ""
  Me.FilterOn = True
 
subfrm_WO_Status_Form.Form.FilterOn = False
 
or

Me!subfrm_WO_Status_Form.Form.Recordsource = " "SELECT * FROM tbl_WO_Master"
 
Thank you all for responding, but I nothing is working. When I click on the Filter button, I will get 1 or 10 records to display and in no particular order. So frustrating.

I have been researching for a couple of days and can't seem to find the issue. Ugh!.
 
Then post your database with some sample data, convert it to version 2010 and zip it.
 
Thank you JHB. I would love to post my db. I am using Access-2007-2013. Will that do? I don't see where I can convert to 2010.
 
Thank you so much! I appreciate your time.
 

Attachments

OMG!!!! I am dancing around. Thank you SO much Gina. I really appreciate you taking the time to help with the code. :-)

I see how you linked both the child and master using code. I am filing this data for future use.

Thanks again. Now I can start using my tool.
 
Private Sub Remove_Filter_Button_Click()

Forms!frm_WO_Status_Form!subfrm_WO_Status_Form.Form.FilterOn = False

End Sub
 

Users who are viewing this thread

Back
Top Bottom