Simple IIf

smask

Registered User.
Local time
Today, 16:44
Joined
Jan 9, 2003
Messages
21
Hi!

I want to do this:

Select only [Kundnummer] then [kundnummer] is equal to 100 in a query.


Have tried this (in the "field" field) but Access just complains.

IIf ([Kundnummer] = 100, [Kundnummer], " ")

/ Smask
 
Last edited:
What is kundnummer because if its a field you are creating in the query you won't be able to reference it in an IIf() function.
 
HI!

Kundnummer is a value that I get from a table and now I only want Kundnummer if it is equal to 100.

The whole thing I want my query to do is:

From ny table Indata I want to display [ett], [Två],[Tre] if [Kundnummer] is equal to 100.

(Kundnummer = Customer ID, so every customer has it own ID and the ID 100 is my own for products in labour)

/ Smask
 
Then you don't need to use the IIf function at all.

If Kundnummer is a field in your table that you don't want to display yet want to query on, you would just put 100 as its criteria.

Or am I not understanding your request?
 
You really got a point!

Didn't think at all of using criteria.

Thanks

/ Smask
 

Users who are viewing this thread

Back
Top Bottom