Link to home
Start Free TrialLog in
Avatar of ES-Components
ES-ComponentsFlag for United States of America

asked on

Why the form filters no longer work correctly?

See attached file. I cannot figure out why all the filters on Form "CustomerSalesHistory_Detail" do not  work correctly. Once I select the date range, I should be able to
select any one of the filters to get results. For some reason once I select the date range, it defaults to a writer "Jaynleep" with a date range of May 1, 2018 and May 2, 2018.
which I did not select.
Any idea what happened?

Thanks in advance for any help!
Rick
CustomerSlsHistory.accdb
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

That doesn't seem to occur for me, but I could be doing it wrong.

When you upload a file, it's best to give explicit instructions on recreating your issue. That way, we don't fumble around trying to figure out how to do it.

Also, I'd trongly encourage you to name your controls in a more meaningful manner. Control names like "Field17" are meaningless, and make troubleshooting much more difficult - especially when you have to come back to this in 6 months to try and figure out what you were thinking at the time!
Like Scott, I was not able to duplicate your issue.

In fact, ... I cant see that your filter is working at all...?

For example: selecting 1/1/2008 to 12/31/2018
...produced *no* records in the subform...?
Not sure I fully understand your filtering code there, ...but a simple example of one way to do this would be something like this:
[frmOrders].Form.Filter = "OrderDate Between " & "#" & txtStart & "#" & " AND " & "#" & txtEnd & "#" & " AND " & "CustomerID=" & "'" & cboCust & "'" & " AND " & "ShipperID=" & cboShip

A generic sample is attached.
I am sure this will get you started.

Let us know

JeffCoachman
AccessEEQ-29104180FilterForm.accdb
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ES-Components

ASKER

Thank you Gustav. I would never have found that. I was staring at this for a couple of hours. I will have to remember to check the Filter properties of the form, should that happen again. Thanks!!!!!
You are welcome!