By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,960 Members | 1,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,960 IT Pros & Developers. It's quick & easy.

perform a calculation on a field then a conditional statement between two fields

100+
P: 107
I have one table in microsoft access database.
I need to perform calculation on a field- then a conditional statement between 2 fields.
field2 - needs to be multiplied by 5
the answer needs to be compared to field1.
I have to find out if field2( after multiplication) is less than field1.

then I have to have a report that gives me only the records where this is true.

any ideas about how I can do this?
(am not sure about syntax of IIF statements in access.)
thank you
May 10 '07 #1
Share this Question
Share on Google+
5 Replies


Rabbit
Expert Mod 10K+
P: 12,347
The iif() syntax is:
Expand|Select|Wrap|Line Numbers
  1. iif(expression, value if true, value if false)
May 10 '07 #2

100+
P: 107
I have created a new field with field * 5.
I have created a new field with IIf statement that results in Yes if condition is true.
I then created a make table query.
In the new table I made a query selecting all records that have IIf statement field filled Yes.
From this I am making a report.
Is there anyway anybody would of done it easier.
Seeing as I will have to update this every week with updated data.
thank you
May 10 '07 #3

Rabbit
Expert Mod 10K+
P: 12,347
I have created a new field with field * 5.
I have created a new field with IIf statement that results in Yes if condition is true.
I then created a make table query.
In the new table I made a query selecting all records that have IIf statement field filled Yes.
From this I am making a report.
Is there anyway anybody would of done it easier.
Seeing as I will have to update this every week with updated data.
thank you
You can do everything in the one iif() field. That expression you want to write can be written as one expression and plugged into the first parameter.

There is no need for a make table query and then a seperate query based on that table. It can be done in one query.
May 10 '07 #4

100+
P: 107
thank you- this should help
May 10 '07 #5

Rabbit
Expert Mod 10K+
P: 12,347
Good Luck.
May 10 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.