473,395 Members | 1,846 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,395 software developers and data experts.

IIF Statements and filtering

Hi, hope you can help me with this.

I am using the following IIF statement in a query to filter out data. I need to filter by site: a, b, c, or No Filter (where No Filter returns all data).

IIf([Forms]![frm FVQ main]![Site]="No Filter",Is Not Null,[Forms]![frm FVQ main]![Site])

[Forms]![frm FVQ main]![Site] is a combo box where 'No Filter' is one of the options. When someone selects 'No Filter' i need to return data from all sites. I thought that using 'Is not Null' would return all data but unfortunately it does not.

Hopefully there is an easy solution to this, however i am lost.

I am using Access '97.

Thanks in advance
May 30 '07 #1
2 1750
puppydogbuddy
1,923 Expert 1GB
Hi, hope you can help me with this.

I am using the following IIF statement in a query to filter out data. I need to filter by site: a, b, c, or No Filter (where No Filter returns all data).

IIf([Forms]![frm FVQ main]![Site]="No Filter",Is Not Null,[Forms]![frm FVQ main]![Site])

[Forms]![frm FVQ main]![Site] is a combo box where 'No Filter' is one of the options. When someone selects 'No Filter' i need to return data from all sites. I thought that using 'Is not Null' would return all data but unfortunately it does not.

Hopefully there is an easy solution to this, however i am lost.

I am using Access '97.

Thanks in advance
Your "NoFilter" selection has no site association, and therefore, is commonly referred to as the "extra row" that needs to specially handled as described in this thread. http://www.thescripts.com/forum/thread652627.html
May 30 '07 #2
Thank you very much !!
May 30 '07 #3

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

Similar topics

3
by: Brian L. | last post by:
After following the discussion on Generator expressions on python-dev for the last few weeks, and finally getting used to list comprehensions as opposed to map/filter, it occurred to me that the...
11
by: Khaled Afiouni | last post by:
Hello, How can I stop/prevent SQL server from running compound SQL statements. I do not want the server to run multiple update/delete/insert/select statements as a batch. Is there an option? ...
3
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
15
by: laurenq uantrell | last post by:
Wondering if there is a physical or realistic limitation to the number of UNION statements I can create in a query? I have a client with approx 250 tables - the data needs to be kept in seperate...
16
by: ram0812 | last post by:
Helo guys, I am trying to query the MSSQL DB using ADO. I am not able to make the LIKE statement fetch the correct results. Can anyone tell me what I need to do to get this working? Below is the...
2
by: JUAN ERNESTO FLORES BELTRAN | last post by:
Hi you all, I am developping a python application which connects to a database (postresql) and displays the query results on a treeview. In adittion to displaying the info i do need to implement...
1
by: sql_er | last post by:
Hi all, I am trying to convert an SQL statement into an XPath (or a sequence of XPath) statements. More specifically, I have the following: SELECT a FROM b WHERE c IN (SELECT d FROM e) I...
3
by: Harry Haller | last post by:
Hello, I want to implement a generic list which will be used to display 7 columns in a GridView. One should be able to sort, filter and page each of the 7 columns. Ideally the filter should be...
8
by: =?Utf-8?B?UGFvbG8=?= | last post by:
Is there any way I can avoid the ugly and repetitive 'if' construct shown below? I can't refactor into a separate method because qryTrans is an anonymous type. I don't think I can use a switch...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.