473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Built-in filter feature conflict with query criteria based on form field

107 Expert 100+
I have a form where you can choose to filter results on an unbound field with a Client ID. The form has a query for it's record source that filters on that field if it is filled in. So the where clause has "WHERE qryDetailList0100Union.ORDClientFK=IIf(IsNull([Forms]![frmDetails]![FilterClient]),[ORDClientFK],[Forms]![frmDetails]![FilterClient])". In the afterupdate event of the filter field I do a me.Requery. That works okay on it's own.

The issue is that if the user uses the built-in filter, such as by being in the bound ClientID field and clicking the Filter icon, and chooses a particular client, then the filter based on the FilterClient field stops working, even when I use the Toggle Filter button to turn off the built-in filtering.

So after using the built-in filter feature, the query criteria based on FilterClient is ignored even when doing me.requery in VBA or clicking Refresh All.

The problem occurs both in Access 2010 and 2013. It also occurs on non-Union queries.

Is this a known issue? Has anyone else experienced this?

I managed to get the query's where clause to kick in by putting me.recordsource = me.recordsource instead of me.requery in the afterupdate event.
May 18 '17 #1

✓ answered by NeoPa

It's not impossible, but certainly more awkward.

The inbuilt filtering is reflected in the .Filter & .FilterOn properties.

2 948
jforbes
1,107 Expert 1GB
In my experience, if you are providing a Filtering mechanism for your users, you need to provide the full range of user needs in your Filtering, and then hide or turn Access' UI filtering. Often the Form Property .AllowFilters is all you need.

The two just do not get along and I've never seen anyone successfully get both to work on the same Form.
May 19 '17 #2
NeoPa
32,556 Expert Mod 16PB
It's not impossible, but certainly more awkward.

The inbuilt filtering is reflected in the .Filter & .FilterOn properties.
May 19 '17 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: MX1 | last post by:
I have a query written in MS Access that has a few calculated fields. Is it possible to refer to that query in a form field. I'd like the form field to show the sum of one of the columns from the...
2
by: neptune | last post by:
I have a query where each customer has an or . Sometimes both fields for a customer are populated, but if is null, then will be populated and vice versa. I have a form, , where I select a...
1
by: pipestew | last post by:
I have a form which allows me to enter a value and then view a report based on that value. The value is currently entered as P-##### and the query criteria is... !! I want the Form to have...
4
by: geraldjr30 | last post by:
hi, i have the following: $T_GROUP = $_POST; $site = $_POST; .... $sql="SELECT day, field1, field3, field4, field5 FROM qry_sum WHERE field3 = '".$T_GROUP."' AND field2 LIKE '".$site."'...
2
by: Phil Dell | last post by:
Hi all, Extremely new to Access and VBA, I have been working my way through several books and sites, and I'm finally breaking down and crying for help. I am developing a...
4
Jerry Maiapu
by: Jerry Maiapu | last post by:
I have about 3 to 4 queries that a filtered using form fields. It works perfectly on my laptop but does not work on other laptop. I am using MS access 97. All other laptops are using access 97...
3
by: postman | last post by:
I have a report based on several criteria that the user can select in listboxes on a form. Each of these criteria have an "ALL" option which, if selected, will prevent that criteria from being...
5
by: Pierkes | last post by:
Hi, Iám having problems with a criteria in a query. The field is a yes/no field. I have a yes/no field on a form which i can check of uncheck. The field is called . In the query criteria i...
7
by: Xenver | last post by:
ok, so i have a form with unbound check boxes on it, i want to alter a query criteria based on the check boxes values,so i have this as an example of my query criteria: IIf(!!=True,>0,Null) SS...
4
by: Pierkes | last post by:
Hi, I have a query in which there is a text field called "name" I have a form with a textfield called "name_client" in which the user can put in the (part of the) name of the client. In the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.