Is anybody can tell me, if MS Access can accept fraction number like Excel?.
I had a project before, the user had to enter with fraction number. I still
can't figure it out untul now.
KF
Jeff Boyce - 30 Aug 2007 18:37 GMT
That depends... do you want Access to merely "accept" a string of
characters, or will you be wanting to "do math" on the value that string of
characters represents?
If the latter, one way to do this would be to build a function that takes a
"text" input (e.g., "1/5") and converts it to a decimal equivalent. Access
can "do math" on the decimal equivalent.
Regards
Jeff Boyce
Microsoft Office/Access MVP
> Is anybody can tell me, if MS Access can accept fraction number like
> Excel?.
[quoted text clipped - 3 lines]
>
> KF
KimTong - 31 Aug 2007 15:17 GMT
How to convert from "1/5" to 0.20 (in decimal)?
THanks...
KF
>That depends... do you want Access to merely "accept" a string of
>characters, or will you be wanting to "do math" on the value that string of
[quoted text clipped - 14 lines]
>>
>> KF
Jeff Boyce - 31 Aug 2007 22:56 GMT
Take a look at the Eval() function. I believe you can use
Eval("1/5") to get 0.2
You could do that calculation in a form, allowing the user to enter "1/5" in
an unbound textbox, then doing the math to get 0.2 and storing that via a
bound textbox (it could even be hidden).
Regards
Jeff Boyce
Microsoft Office/Access MVP
> How to convert from "1/5" to 0.20 (in decimal)?
> THanks...
[quoted text clipped - 22 lines]
>>>
>>> KF
KimTong - 31 Aug 2007 15:15 GMT
I don't mind wheter Access accept in Text or Number, as long as Acces can do
calculation. So when the user enter the price, that price should be in
fraction. Then Access has to convert it in decimal or whatever, so we can
calculate that field when we need it.
Thanks for your help.
KF
>Is anybody can tell me, if MS Access can accept fraction number like Excel?.
>I had a project before, the user had to enter with fraction number. I still
>can't figure it out untul now.
>
>KF