<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2719.2200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff
size=2>Barb,</FONT></SPAN></DIV>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff size=2>If I understand
you correctly you are trying to display a numeric field with one of three
different formats depending on the value. AFAIK this is not possible
directly. The only solution I know of is to test the numeric value and
then convert it to the proper string value for display.</FONT></SPAN></DIV>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff size=2>If number = 0
then</FONT></SPAN></DIV>
<DIV><SPAN class=328582412-09042003> <FONT color=#0000ff
size=2>txtnumber = ""</FONT></SPAN></DIV>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff size=2>elseif number =
Int(number) then</FONT></SPAN></DIV>
<DIV><SPAN class=328582412-09042003> <FONT color=#0000ff
size=2>txtnumber = format(number,99)</FONT></SPAN></DIV>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff
size=2>else</FONT></SPAN></DIV>
<DIV><SPAN class=328582412-09042003> <FONT color=#0000ff
size=2>txtnumber = format(number,99.99)</FONT></SPAN></DIV>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff
size=2>endif</FONT></SPAN></DIV>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff size=2>Warning above is
air code, no guarantees.</FONT></SPAN></DIV>
<DIV><SPAN class=328582412-09042003><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN lang=en-us><B><FONT color=#0000ff>Charles Wortz</FONT></B></SPAN>
<BR><SPAN lang=en-us><FONT color=#0000ff>Software Development
Division</FONT></SPAN> <BR><SPAN lang=en-us><FONT color=#0000ff>Texas Education
Agency</FONT></SPAN> <BR><SPAN lang=en-us><FONT color=#0000ff>1701 N. Congress
Ave</FONT></SPAN> <BR><SPAN lang=en-us><FONT color=#0000ff>Austin, TX
78701-1494</FONT></SPAN> <BR><SPAN lang=en-us><FONT
color=#0000ff>512-463-9493</FONT></SPAN> <BR><SPAN lang=en-us><FONT
color=#0000ff>CWortz@tea.state.tx.us</FONT></SPAN> </DIV>
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Barbara Ryan
[mailto:BarbaraRyan@cox.net] <BR><B>Sent:</B> Wednesday 2003 Apr 09
06:57<BR><B>To:</B> Access List<BR><B>Subject:</B> [AccessD] Format for
decimal<BR></FONT></DIV>
<DIV><FONT size=2><SPAN class=328582412-09042003><FONT
color=#0000ff> </FONT></SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=328582412-09042003> </SPAN>I am displaying
several "hours worked" fields on a report (which contains 2 decimal
positions). If hours worked is a whole number, I do NOT want to display
any decimal positions (e.g. "8"); if hours worked is 0, I do not want to display
anything (i.e., leave the field blank/null); it hours worked contains decimals,
I want to display the decimals (e.g., "8.25").</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>If I set up the format as "##.##", the decimal point is
displayed when hours worked is a whole number (e.g., "8.") How do I get
rid of that pesky decimal point??</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks,</FONT></DIV>
<DIV><FONT size=2>Barb Ryan</FONT></DIV></BODY></HTML>