473,395 Members | 1,530 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.

"Select all" in IIF-function

Does anybody have any advice on selecting all records within a
iif-statement?

I have a form in which one has to state if all projects or just a
selection of projects are to be used for a query. If "all projects" are
required the query should show all records.
In the example below the iif-statement should select all projects or
just "projectnumber 2".

I tried the following as criteria but none is working:

IIf([Forms]![F_Quantities]![ProjSelOrAll]="all projects",Is
Null,"projectnumber 2")

IIf([Forms]![F_Quantities]![ProjSelOrAll]="all projects",like
"*","projectnumber 2")

IIf([Forms]![F_Quantities]![ProjSelOrAll]="all
projects",*,"projectnumber 2")

Any suggestions on this?

Thanks in advance,
Rene

Sep 14 '06 #1
2 5827
This should work

Like IIf([Forms]![F_Quantities]![ProjSelOrAll]="all
projects","*","projectnumber 2")

<bh****@hotmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Does anybody have any advice on selecting all records within a
iif-statement?

I have a form in which one has to state if all projects or just a
selection of projects are to be used for a query. If "all projects" are
required the query should show all records.
In the example below the iif-statement should select all projects or
just "projectnumber 2".

I tried the following as criteria but none is working:

IIf([Forms]![F_Quantities]![ProjSelOrAll]="all projects",Is
Null,"projectnumber 2")

IIf([Forms]![F_Quantities]![ProjSelOrAll]="all projects",like
"*","projectnumber 2")

IIf([Forms]![F_Quantities]![ProjSelOrAll]="all
projects",*,"projectnumber 2")

Any suggestions on this?

Thanks in advance,
Rene


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Sep 14 '06 #2
Hi Martin,

It's working! Thanks a lot!

Cheers,
Rene
Martin schreef:
This should work

Like IIf([Forms]![F_Quantities]![ProjSelOrAll]="all
projects","*","projectnumber 2")

<bh****@hotmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Does anybody have any advice on selecting all records within a
iif-statement?

I have a form in which one has to state if all projects or just a
selection of projects are to be used for a query. If "all projects" are
required the query should show all records.
In the example below the iif-statement should select all projects or
just "projectnumber 2".

I tried the following as criteria but none is working:

IIf([Forms]![F_Quantities]![ProjSelOrAll]="all projects",Is
Null,"projectnumber 2")

IIf([Forms]![F_Quantities]![ProjSelOrAll]="all projects",like
"*","projectnumber 2")

IIf([Forms]![F_Quantities]![ProjSelOrAll]="all
projects",*,"projectnumber 2")

Any suggestions on this?

Thanks in advance,
Rene

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Sep 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Phil Powell | last post by:
$sql = 'INSERT INTO fs_usermetadata (' . substr(trim($cols), 0, strrpos(trim($cols), ',')) . ') VALUES (' . substr(trim($values), 0, strrpos(trim($values), ',')) . ')'; if (!mysql_query($sql))...
23
by: ian justice | last post by:
Before i post actual code, as i need a speedyish reply. Can i first ask if anyone knows off the top of their head, if there is a likely obvious cause to the following problem. For the moment i've...
10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
1
by: Andrew McNab | last post by:
Hi folks, I have a problem with an MS Access SQL query which is being used in an Access Report, and am wondering if anyone can help. Basically, my query (shown below) gets some records from a...
3
by: Not Me | last post by:
Hi, Is there any criteria I can use in my where clause to say 'anything'? Maybe like the _ used in some languages? For my example, I want to use an inline-if, so if a checkbox is ticked I say...
6
by: GSteven | last post by:
(as formerly posted to microsoft.public.access.forms with no result) I've created a continuous form which is based on a straightforward table (ex - customers - 100 records). On the form there is...
2
by: google | last post by:
Hello everyone, I am having an issue using the "Multi Select" option in a list box in MS Access 2003. I am making a form that users can fill out to add an issue to the database. Each issue can...
5
by: Lennart | last post by:
I really like the construction: select * from new table (update ....) X but I noticed that it cant be used as: insert into T select * from new table (update ....) X because of:
7
by: php_mysql_beginer911 | last post by:
Hi .. hope someone will help i am trying to figure it out why i cannot post string "union select" every time i try to post data which content union and select .. the page doesn't get posted and...
1
by: StuartD | last post by:
I have a sub form that is populated based on the selection of a year from a combo box on the main form. I'm trying to add a second main form combo box for item category to further filter the sub...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.