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 don't want my numbers to round off! 1

Status
Not open for further replies.

Niki

MIS
Mar 23, 1999
21
0
0
CA
Why are my numbers rounding off when I enter numerical data such as 92.3 I get 92!~? The field is a NUMBER format. The format is GENERAL. The decimal places are 2. This format is the same in the TABLE and the FORM. I have my data as number rather than text because I need to do averaging... which is another matter I am wrestling with. However... one question at a time.

Thanks.... Niki [sig][/sig]
 
you probably have Integer or Long Interger selected, change to single or double, and Fixed Format instead of General.


PaulF [sig][/sig]
 
My guess would be that you are using an Integer format.

In the table design, select the field and in the Properties section (below left) change the field size to single precision.

I think this will do the trick. [sig]<p>Larry De Laruelle<br><a href=mailto:larry1de@yahoo.com>larry1de@yahoo.com</a><br><a href= > </a><br> [/sig]
 
Thank-you Paul~! I looked at that idea at first then I thought I had better ask before trying! Aprehension is not the way to learn the computer and I just proved that! Thanks a million for a quick response~! Niki [sig][/sig]
 
Paul,

I have been pounding my head away for the last couple of hrs.. and nothing seemed to work.. and your suggestion was great. Thks so much .. it has saved me a lot of unhappy hrs..
Usha
 
ARGH!

I want to add Currency together and it is doing the same thing, but instead of $128.21 it is saying $128.00

How frustrating. I changed the type from Currency to Number(data type), Single(field size), Currency(Format), and 2 (decimal places). And its fine, but now i dont get my &quot;$&quot; sign.
BUT
My form adds some costs and displays as $1245.00(should be $1245.21) when i dim the POCost as Integer and dim it as a string it shows 1245.206, no $ sign and decimal set to 2 but shows 3!

heres a snippet of my calc
****
Private Sub Form_Current()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strFirst, strNext As Integer

Set db = CurrentDb
Set rst = db.OpenRecordset(&quot;SELECT POTotal FROM tblPO WHERE POLastStatus < 6&quot;)

If (rst.BOF And rst.EOF) Then
Me.Text30 = 0
Exit Sub
Else
rst.MoveFirst
strFirst = rst!POTotal
rst.MoveNext
Do While Not rst.EOF
strNext = strFirst + rst!POTotal
Me.Text30 = strNext
strFirst = strNext
rst.MoveNext
Loop
End If
rst.Close
Set rst = db.OpenRecordset(&quot;SELECT POTotal FROM tblPO WHERE POLastStatus = 6&quot;)

If (rst.BOF And rst.EOF) Then
Me.Text33 = 0
Exit Sub
Else
rst.MoveFirst
strFirst = rst!POTotal
rst.MoveNext
Do While Not rst.EOF
strNext = strFirst + rst!POTotal
Me.Text33 = strNext
strFirst = strNext
rst.MoveNext
Loop
End If
rst.Close
Set rst = Nothing
db.Close
End Sub
****

any assistance would be appreciated.
 
Hi adamroof,

I know your query is (sligtly) related, but it's generally better to start a new thread with a new question.

As far as your problem goes, you have strFirst and strNext defined as Integer in your code so all your arithmetic will be integer arithmetic, regardless of your textbox and table fields.

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top