Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

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
0
cansevin
Asked:
cansevin
1 Solution
 
cansevinAuthor Commented:
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
In the Bookings table ... change the Field Size of Total Hours from Long Integer to Single.

mx
0
 
Rey Obrero (Capricorn1)Commented:
change the Field size to double
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Oh ... and same for Duration in the Appointments table.

mx
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
see image
Capture1.gif
0
 
Rey Obrero (Capricorn1)Commented:
see this


PracticeMdb.mdb
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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 MVP, Access and Data Platform)Commented:
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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now