We help IT Professionals succeed at work.
Get Started

MS ACCESS:  Filter query based on check box selection within userform..

86 Views
Last Modified: 2020-02-11
Hello Team


Can you please advise on the syntax that would be required to filter a query from selecting a true or false value of a checkbox.

Form Name:      frmAnalytics
Query Name;    qryRenewal
Checbox Name.  chkNoErrors
Reference Field:  TotalErrorCount

The checkbox purpose is to allow the user to select whether or not the qryRenewals is to be filtered with records that show all records (false checkbox value) or to only show records that have a positive Total Error Count value which means excluding any Null or 0 entries in the Total Error Count field.(true checkbox value)

In the qryRenewals I already have criteria filters that are driven by the selections of the frmAnaIytics form and would like to add the checkbox filtering using the same method.  For example, I have a filter field in the query which filters by which team is selected from a drop down control on the form using:

IIF([Forms]![frmAnalytics]![cboUser]<>"",[User]=[Forms]![frmAnalytics]![cboUser],True)

The field holding the above formula has a '<>False' query criteria applied.

As always, any assistance is much appreciated.

Sincerely

Dale







I  have form  which is used to filter various queries and export for reporting.

The form allows the user to select via a drop down control a specific query to filter, for example qryRenewal.


What I would like to do is, allow the user the have the option to select a checkbox to filter out records that contain any null or 0 entries in the TotalCount field of the qryRenewal.  

I already have criteria filters sent into the qryRenewal that are linked and determined by the selection of the frmAnalytics for dates, query selection, team selection etc.








On this form, the user has the option to select dates for data pull, type of query to pull from and if they wish to filter only by particular team members or managers etc.
In my queries I have input into the following in order to pull filter by a selected user:  
IIF([Forms]![frmAnalytics]![cboUser]<>"",[User]=[Forms]![frmAnalytics]![cboUser],True)

Open in new window

I then filter the field by <>False in order for the entries in the User field of the query to be selected.

What I would like to do is to add another filtering field that refers to

I
Comment
Watch Question
President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017
Commented:
This problem has been solved!
Unlock 2 Answers and 8 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE