Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2007, 10:53 AM
Authorized User
 
Join Date: Nov 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default Allowing Decimal values

Every time I have some Calculations in my code the output figure is always rounded off to the nearest whole number. therefore, the decimals are discarded. Sometimes I want to have a figure, especially currency to atleast two decimal places. This happens whether I declare the values as integer or double and set the properties of the text box to two decimal places. What should I do to see the decimals?

Bmulenga
__________________
Bmulenga
 
Old February 12th, 2007, 12:38 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Integer will definitely not allow decimal places.
If you want to use money calculations, set the data type as Currency in the table design.

In fact, you need to set the number properties in the table design for decimals.

Did that work?

mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting decimal values in xsl SOMANATHAN10 XSLT 1 May 10th, 2007 07:47 AM
decimal data type all 0's after decimal gobotsoup SQL Server ASP 1 February 28th, 2007 02:32 PM
Returning Decimal values from database hasanali00 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 October 10th, 2005 08:10 PM
How to add two variable with Decimal values sa_moizatyahoo ASP.NET 1.0 and 1.1 Basics 1 April 3rd, 2004 06:17 AM
decimal values is rounded hosefo81 PHP Databases 2 December 9th, 2003 01:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.