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

Decimals in a form field 1

Status
Not open for further replies.

Beretta22

Technical User
Aug 20, 2002
28
0
0
US
I have a form that has 3 fields on it. First one is a number. Second and third are 1/3 of that number and 2/3 of that number respectivly. The second two fields are not bound to a field in a table but just on the form. I cannot seem to get thet second two fields to show the number without decimals. I set the properties to "0" decimals but I still get them. Can they be rounded off somehow and not show the decimals points?

The formula I used on the 1/3 field is: =sum"[fieldname]")/3

The 2/3 field is : =sum("[fieldname]")/3*2

Any clues? Thanks for your help!!!

Jay
 
1/3 field: =Int(([FieldName]/3)+0.5)
2/3 field: =FieldName - 1/3FieldName

Int function cuts off any decimals and only leaves the integer part of a number
adding .5 will cause orig number to 'round up' at .5 and above, and 'round down' at < .5

hope this helps--g
 
Thank you Ginger for your help. Will try it as soon as I can!!!
 
OK... Works fine. Cannot thank you enough!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top