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

negative numbers

P: 1
How can I view -100 as (100) in ms access

Thanks
Dec 25 '07 #1
Share this Question
Share on Google+
4 Replies


puppydogbuddy
Expert 100+
P: 1,923
How can I view -100 as (100) in ms access

Thanks
Not sure whether you are refering to the parentheses or the value

For showing parentheses in place of the negative sign:

For currency/number datatype fields, try placing >> 0;(0) << in the field or control's Format property.
__________________________________________________ ____________

For showing the value as a positive number, try using the absolute value function.

= ABS(-100)
Dec 25 '07 #2

ADezii
Expert 5K+
P: 8,597
How can I view -100 as (100) in ms access

Thanks
You can use the built-in FormatNumber() Function for this, as in:
Expand|Select|Wrap|Line Numbers
  1. MsgBox FormatNumber(-100, vbFalse, vbFalse, vbTrue)
OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. (100)
Dec 25 '07 #3

alzowze
P: 3
To view any negative number as a positive number just multiply it by minus one.
eg... Select yourfield * -1 as theresult from yourtable.

hth...

Alan
Dec 26 '07 #4

ADezii
Expert 5K+
P: 8,597
To view any negative number as a positive number just multiply it by minus one.
eg... Select yourfield * -1 as theresult from yourtable.

hth...

Alan
alzowze, the point was to view the Negative Number as a Positive Value within Parenthesis.
Dec 26 '07 #5

Post your reply

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