Full Version: 2nd Sub-form Filter Won't Clear
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
jasonsas
I have a form which has two sub-forms on it. The user is able to user drop down boxes to filter both of these sub-forms at the same time.

The problem I have is that when the user tries to clear the filter on both sub-forms, only the first sub-form clears. Here is my code:

Me.cboFinYear = Null
Me.cboMonth = Null
Me.cboBusinessArea = Null

Me!frmCostingAllocations.Form.FilterOn = False
strAllocationFilter = ""
Me!frmCostingAllocations.Form.Refresh

Me!frmCostingDetail.Form.FilterOn = False
strFilter = ""
Me!frmCostingDetail.Form.Refresh

So in the code above, the ‘frmCostingAllocations’ form will clear, but the ‘frmCostingDetail’ form won’t. If I reverse the order in the code above, the first one listed in the code clears but the second one doesn’t.

Does anyone know why this is and how to fix it? iconfused.gif

Cheers,
yvesdekort
Hi,

Did you try using a requery instead of a refresh?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.