|
-
Feb 3rd, 2007, 06:56 AM
#1
Thread Starter
Addicted Member
[RESOLVED] MS Access 97 Database Decimal Problem
Hi
Ive created a DB for VB6
Now a field cost has the following
field size : long integer
format : general integer
decimal places : 2
Now whatever value is being put there.. its getting rounded off..
I want it to be stored as 2 decimal places..
So eg : I want the field to store number as 33.67 OR 99.01 .. or 99.00
But it is rounding it off..
can anyone tell me why is it rounding off and how to fix the field on any input to 2 decimal places..
Last edited by khandu; Feb 3rd, 2007 at 07:46 AM.
-
Feb 3rd, 2007, 07:12 AM
#2
Member
Re: MS Access 97 Database Decimal Problem
There is no problem aside from operator error; Its an integer field, look it up, then use single.
Last edited by default user; Feb 3rd, 2007 at 08:30 AM.
-
Feb 3rd, 2007, 07:21 AM
#3
Thread Starter
Addicted Member
Re: MS Access 97 Database Decimal Problem
thanks .. rep added and thread resolved
-
Feb 3rd, 2007, 07:36 AM
#4
Thread Starter
Addicted Member
Re: [RESOLVED] MS Access 97 Database Decimal Problem
oops sorry not resolved..
i am doing some calculations and saving in the field "cost"
still saving as 87.65002
Field Properties
datatype : number
field size : single
decimal places : 2
please help here
-
Feb 3rd, 2007, 08:29 AM
#5
Member
Re: MS Access 97 Database Decimal Problem
Try trimming the value before saving.
val = int(Val * 100)/100
I suspect the format you are setting is for the Access user interface -input only.
-
Feb 3rd, 2007, 12:50 PM
#6
Thread Starter
Addicted Member
Re: MS Access 97 Database Decimal Problem
yeah that trim did the works..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|