Solved

Number with a decimal

Posted on 2011-02-22
9
290 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 119

Expert Comment

by:Rey Obrero
ID: 34955394
change the Field size to double
0
 
LVL 75
ID: 34955399
Oh ... and same for Duration in the Appointments table.

mx
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 75
ID: 34955421
see image
Capture1.gif
0
 
LVL 119

Expert Comment

by:Rey Obrero
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Syntax Error in Query 7 30
Two list boxes - best structure 3 31
Excess tables to Excel BackUp 3 28
Query design issue 2 21
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

919 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

19 Experts available now in Live!

Get 1:1 Help Now