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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have an Access 2016 form that con

Status
Not open for further replies.

wantj43

Technical User
Jul 23, 2021
1
0
0
US
I have an Access 2016 form that converts and displays a mm entry to inches. Is it possible to have the decimal portion displayed in "eights"?
I have been working on this issue for a week and the closest to a possible solution might be the DecimalToFraction function.
All help very much appreciated.
Joe
Note: I am new to this group so not certain if the question is allowed.
If not I apologize.
 
Hi

This is a Crystal Reports forum. It looks to me that what you need is an Access solution rather than a Crystal Report solution.

There are Tek-Tips forums for questions relating to Access Forms and Access Reports (and other Access issues). If it is an Access solution you are looking for I'd suggest you use the Forum Search functionality at the top of the Tek-Tips home page and post the question there.

If however you are looking for a Crystal Reports solution and I understand the problem correctly (ie display a decimal such as "7.25" inches as "7 2/8"), I did it like this:

Code:
WhilePrintingRecords;
Local NumberVar a;
Local NumberVar b;

a := Truncate({Decimal_Value});
b := {Decimal_Value}- a;

ToText(a, '#') + ' ' + ToText(Round(b * 8, 0), '#') + '/8'

Not sure it will help, but even if you are trying to do something in Access you may be able to adapt this formula.

Regards, Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top