Bill Heath said:
I am building a recipe database. The gals want to enter quanities in
fractions instead of decimal values. Can I do math on fractions without
converting to decimal equivilants?
With some restrictions, you can easily convert the fractions
to real numbers in your calculations. The restrictions are
simply that they are only something like 1/4 and if you
allow something like 2 1/4 that there be no spaces on either
side of the / and a space between the integer and the
fraction.
Assuming the you have a text field in a table with values
like the above, the decimial value will be returned by:
Eval(Replace(fractionfield, " ", "+"))
If you can not live with those restrictions, you will need
to create a function that parses whatever syntax you want to
allow and then does the needed calculation.
Either way, you can then use the result of the Eval or your
custom function in other calculation such as:
Eval(Replace(fractionfield, " ", "+")) * Quantity