Solved

Number with a decimal

Posted on 2011-02-22
9
298 Views
Last Modified: 2012-05-11
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
Comment
Question by:cansevin
9 Comments
 

Author Comment

by:cansevin
ID: 34955353
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 34955387
In the Bookings table ... change the Field Size of Total Hours from Long Integer to Single.

mx
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34955394
change the Field size to double
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 75
ID: 34955399
Oh ... and same for Duration in the Appointments table.

mx
0
 
LVL 75
ID: 34955421
see image
Capture1.gif
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34955439
see this


PracticeMdb.mdb
0
 
LVL 75
ID: 34955441
attached with fix.

mx
PracticeMdb-MX01.zip
0
 
LVL 21
ID: 34955756
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
 
LVL 75
ID: 34955874
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now