If or similar functions

S

Stuart

Sorry I am very new to access, I have a query and a report and on the report
I bring over two fields say like

Order No.
Value of Order

I want to create a seperate column on the report like IF value of Order >=
£1000, then Value of Order else "Blank". This is easy in Excel but I cannot
seem to do it in Access.

Thanks Stu
 
R

Rick B

You would create an UNBOUND TEXT BOX and put the following in it...

=IIf([valueof order]>=1000,[valueoforder],"")
 
F

fredg

Sorry I am very new to access, I have a query and a report and on the report
I bring over two fields say like

Order No.
Value of Order

I want to create a seperate column on the report like IF value of Order >=
£1000, then Value of Order else "Blank". This is easy in Excel but I cannot
seem to do it in Access.

Thanks Stu

Do you want to actually write the word "Blank" or do you want just a
blank space?

A blank space...
In the control source of an unbound text control in the report:
=IIf([Order]>=1000,[Value of Order],"")

To write the word "Blank"...
=IIf([Order]>=1000,[Value of Order],"Blank")
 
I

Ian Davies

Stuart
You could also put it in the 'Field' part of a blank column of your query

MyFieldName=IIf([valueof order]>=1000,[valueoforder],"")
Then you simply put MyFieldName or what ever you called it on your report
like all the other fields

Ian
 
F

fredg

Stuart
You could also put it in the 'Field' part of a blank column of your query

MyFieldName=IIf([valueof order]>=1000,[valueoforder],"")
Then you simply put MyFieldName or what ever you called it on your report
like all the other fields

Ian

Stuart said:
Sorry I am very new to access, I have a query and a report and on the report
I bring over two fields say like

Order No.
Value of Order

I want to create a seperate column on the report like IF value of Order >=
ï½£1000, then Value of Order else "Blank". This is easy in Excel but I cannot
seem to do it in Access.

Thanks Stu

Ian and Stu,
If this IIf statement were to be placed in a query QBE grid, it would
need to be written like this:
MyFieldName:IIf([valueof order]>=1000,[valueoforder],"")
 
I

Ian Davies

oops
Yes your right of course. I knew that :)
Well it is late and Im not thinking straight
Ian

fredg said:
Stuart
You could also put it in the 'Field' part of a blank column of your query

MyFieldName=IIf([valueof order]>=1000,[valueoforder],"")
Then you simply put MyFieldName or what ever you called it on your report
like all the other fields

Ian

Stuart said:
Sorry I am very new to access, I have a query and a report and on the report
I bring over two fields say like

Order No.
Value of Order

I want to create a seperate column on the report like IF value of Order =
?1000, then Value of Order else "Blank". This is easy in Excel but I cannot
seem to do it in Access.

Thanks Stu

Ian and Stu,
If this IIf statement were to be placed in a query QBE grid, it would
need to be written like this:
MyFieldName:IIf([valueof order]>=1000,[valueoforder],"")
 
Top