iif & And statement in Access

ianuk1983

Board Regular
Joined
Oct 30, 2006
Messages
104
Hello guys,

Still starting out in access I have the following I'm looking to try and do which I built in the expession builder, which doesnt work.

Package: IIf([Voice]>0 And [Blackberry]>0,"Voice & BB","")

I'm simply trying to do a =if(and( statement as I know it in excel. can anyone let me know were i'm going wrong?

Thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi Ian

Is this in a query? If so can you post the full SQL for the query? You can get into the SQL when in the query design screen by clicking on menu option View > SQL View. If this is not in query can you explain where you are using this expression?

Andrew
 
Upvote 0
Absolutely yes! Finally someone recognised it!!!!!

I sat and watched the movie again the other night. I so thoroughly enjoyed the duelling banjo scene that I decided to change my avatar to Lonny from that scene. IMO that has to be one of the most memorable movie scenes.

Cheers
Andrew
 
Upvote 0
I usually watch Deliverance until few minutes after that scene, then turn it off.
 
Upvote 0
Looks to be working now, but I'm working for a way to include 3 fields
example

IIf([Voice]>0 And [Blackberry]>0 And [Data]>0," Voice Data & BB"

but is on looking at the first two, is this even possible?
or a way round this?
 
Upvote 0
ian

It should be possible.

But I think you need to answer Marbles original question about the field data types.

Also is it possible for any of the fields to be empty?
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,044
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top