Link to home
Start Free TrialLog in
Avatar of cansevin
cansevin

asked on

Number with a decimal

I feel like a fool for asking this... but I have a field in a form and everytime I hit, 4.5 it comes up as "4"... how do I make it so it stays the same? I have checked everything I can think of.

Attached is the database. The fields are "Total Hours" and "Duration"... please explain so I can fix it in the future.

Thanks!

Chris
Avatar of cansevin
cansevin

ASKER

ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
change the Field size to double
Oh ... and same for Duration in the Appointments table.

mx
Unless you need more than 4 decimal places I find that the Currency data type is actually better and more accurate  in precision than single or double.
Since the OP is apparently dealing with Hours, Single with two decimal places is more than sufficient,  having a decimal precision of 7 places.

Both Double and Currency take up 8 bytes to store, whereas Single takes only 4 bytes.

mx