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
cansevinAsked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
In the Bookings table ... change the Field Size of Total Hours from Long Integer to Single.

mx
0
 
cansevinAuthor Commented:
0
 
Rey Obrero (Capricorn1)Commented:
change the Field size to double
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Oh ... and same for Duration in the Appointments table.

mx
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
see image
Capture1.gif
0
 
Rey Obrero (Capricorn1)Commented:
see this


PracticeMdb.mdb
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
attached with fix.

mx
PracticeMdb-MX01.zip
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
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.
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.