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

Access Query Expression Help

P: 1
Hi everyone ,
Hope all is well with you guys and girls :)
I saw someone had a similar posting in this forum and need some help also with a Access Query Expression.

I need an expression to state the following

If Field 1 is greater or equal to Field2 then make Field3 Equal $1.00 and Field 4 equal $0.00


Also a sql Statment to show Numbers rounded to 2 decimal places . I am using frontpage 2000 and am pulling the data from access but i need a sql statment to show some of the fields rounded to 2 .decimal places.


Thanks in advance to who ever can help me :)
Sep 11 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 296
Hi everyone ,
Hope all is well with you guys and girls :)
I saw someone had a similar posting in this forum and need some help also with a Access Query Expression.

I need an expression to state the following

If Field 1 is greater or equal to Field2 then make Field3 Equal $1.00 and Field 4 equal $0.00


Also a sql Statment to show Numbers rounded to 2 decimal places . I am using frontpage 2000 and am pulling the data from access but i need a sql statment to show some of the fields rounded to 2 .decimal places.


Thanks in advance to who ever can help me :)
Try:
iif([Field1]>=[Field2], [Field3]=1.00 And [Field4]=0.00, ''")

You will need to decide what you want to happen if Field1 is not >= to Field2. For now, I just placed an empty string there ("") but I'm sure that's not the result you are looking for if the condition is false.

As for making the numbers 2 decimal places, I generally make my queries in the design view in Access and then I right click the Field I want to format, click Properties, and change the format to 2 decimal places there. I'm really not sure how to do it in an sql statement or if it's even possible.
Sep 11 '07 #2

Post your reply

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