If or similar functions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
You would create an UNBOUND TEXT BOX and put the following in it...

=IIf([valueof order]>=1000,[valueoforder],"")
 
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")
 
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
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],"")
 
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],"")
 
Thank you all very much for the replies, I will play away today.

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top