IF(OR Statement in Access

Nabiyah1

New Member
Joined
Dec 1, 2004
Messages
13
Can anyone tell me if its' possible to use the same type of IF(OR Statement that can be used in Excel, in Access. I'm a little green to all of this, comparatively, and I need a little help.

I want to know if I can say... IIF(OR([fieldname]<[fieldname],[fieldname]<[fieldname),"y","n") but it doesn't work. Am I writing something wrong? Or is this function not available in access. It works fine in excel.

Thanks for your help with this,
Ny
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Solution

This can be solved by placing the OR between the arguments, instead of in front, like in Excel. For example:

DysBtwn: IIf([DCallRtrnd]>#3/31/2005# Or [DCallRtrnd]<#1/1/2005# Or [DCallRcvd]<#1/1/2005# Or [DCallRcvd]>3/31/2005#, "DateConflict",
"1stQtr")

I figured this out for myself, but I wanted to post an answer here, just in case someone else needed the answer, and the post didn't receive any other replies.

Hope this is helpful for some of those who may be a little green like me :)
Have a great week!

Ny
 
Upvote 0
Good on you for working it out!

There are a few functions in Access that work like operators (i.e. between the arguments instead of at the front). Other examples include 'And' as well as 'Mod' to name just 2. I'm sure there are plenty more...

Andrew :)
 
Upvote 0

Forum statistics

Threads
1,224,798
Messages
6,181,036
Members
453,012
Latest member
Thomas Meixner

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