Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can fractions be entered in conventional format like 5/8

Status
Not open for further replies.

dunnjt

Technical User
Nov 20, 2001
64
US
Using the data type "number" in a field does not allow an entry such as 5/8, or 3/4. Since calculations must be performed on this field, the field must have "number" properties. How can I get Access to accept fractions in the conventional n/n format and still be able to perform calculations with those entries?
Thank You,
Jerry
 
Actually you (as far as I know) cannot. The two common 'workaround' I have seen is to implement the "Fraction" as two text boxes (Numerator) and Denominator) with the occassional variation of having and extra control between (sometimes a text box otherwise just a label) to accept (or hold) the division symbol OR enter the "fractional" value, let Ms. A, convert it to a decimal, and then do the 'reduction' to the least common denominator, which just approximates the numerator / denominator. In either situation, you end up using (and perhaps storing) the two seperate values, usually to no particular advantage, as Ms. A (and other MS family menbers) will just 'do the math' whenever you enter the fraction anyway. Perhaps (JUST perhaps) you really do have a UNIQUE situation where the parts are REALLY REALLY REALLY REALLY really different?





MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
That's an interesting work around that you propose. I am wondering if there are any folks out there who have written database programs for folks like carpenters who are always working with fractions, or chefs who are also working with fractions.
I have not tried it but I am also wondering if Excel poses the same difficulty, i.e. not accepting fractions in convention format in a single cell.
Thanks for the suggestion. I am still open for more.
Regards,
Jerry D.
 
Just try the eval function:

Me.Text0 = Eval(Me.Text0)

God luck,
Hans
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top