473,609 Members | 1,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Decimal places in calculated fields

1 New Member
I have a database with 8 calculated fields. In each calculated field, I would like to have some values with 0 decimal places, while others would have 1 place, based on the values in the records that make up the calculation. It seems I've been able to address the whole number issue by having all the calculated fields set at Result Type = single, the Format = General Number, and Decimal Place = 1. This seems to automate the values, such that whole numbers show up in the calculated fields in Tables, Queries and Report with no decimal places.

However, this also results in record values that have 1 decimal place in the regular fields showing up with many decimal places in the calculated fields, even though the decimal place setting is 1. Note: this happens primarily in calculated fields that are based on other calculated fields, if that makes difference.

Is there a setting combination for a calculated field that addresses both needs? TIA
May 13 '18 #1
1 2979
NeoPa
32,566 Recognized Expert Moderator MVP
ProfBurns:
even though the decimal place setting is 1.
What is this "the decimal place setting" you're referring to? Individual controls and fields have such settings - individually. This isn't something shared across a database. Some items inherit properties from other items to be sure, but you've given no indication in your question to indicate this might be so.

Now, asking your first question is always going to be a little hit & miss. I understand that. That doesn't help me understand what you're asking about though.

Let's start with trying to determine some basic and critical facts. Are you asking about fields that are part of a table, or fields that are in a query? Both can have Format properties. Unfortunately, some calculations make it hard for Access to decide exactly what it's working with so it sometimes doesn't recognise whether to show the property for decimal places.

Once we know what you're trying to do we can certainly lead you in the right direction.
May 13 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
4044
by: John Bahran | last post by:
I am trying to use calculated fields in my query but all the results are zero ven when they're not. Please help. Thanks.
2
2859
by: David Nunn | last post by:
Need to preface that I am not much of an Access type. Doing I have several tables that have currency fields, which I run queries against to compare the figures in both. The data is imported from Excel spreadsheets supplied by different parties, over which I have no control. My problem is that whilst several parties supply the spreadsheets with the currency fields containing two figures to the right of the decimal place (ie 123.51,...
3
33226
by: paulquinlan100 | last post by:
Hi I have a couple of calculated fields in a report, i've set the Decimal Places property to 0 and the format to General Number, however when previewing the report it still comes up with a number with up to 8 decimal places! Any suggestions how to overcome this problem gratefully received! Paul
4
6938
by: Hank | last post by:
Hello, I'm running Access 2000. I would like to know if its possible to use VBA code to determine how many decimal places are specified for each table field. Currently I loop throught the Tables Collection, the Tables Fields Collection, and then the Field Properties Collection but I do not see what I need. I don't want to change the setting. I just want to make a list of the decimal place setting for each "Single" field in
2
6983
by: hunslair | last post by:
This is a really basic question. I am taking a teach yourself beginners course on Access 2003 and have run into a road block on one practice. In a select query, I have created a simple calculation field. Markup:(-)/ which is to formatted as Percent with 0 Decimal places. When I click into the Format box is am offered
6
6615
by: TSGB | last post by:
Hi, I have a Table which has 2 Double, Fixed Number fields to 3 decimal places. This fields are populated as the result of 2 division operations which lead to multiple decimals (the numbers show with 3 decimals in the tables, forms, etc). I need to combine both of those fields on a form (text boxes)in another text box with a series of different operands, like /, *, ± etc. =&"±"& but I cannot get it to work without showing all the...
4
1910
by: ChipR | last post by:
I have a table with currency fields set to 2 decimal places. My query has Percent: IIf(=0 Or IsNull(),0,/*100) Even with a balance and estimate with 1 digit decimals I'm getting 13 digits in the Percent field. My form's textbox is set to Fixed and 2 decimal places, but it refuses to behave. I ended up switching all my $ fields from Number to Currency because of this problem. I'm reluctant to put Round() in the query because it's...
9
3484
by: matt753 | last post by:
I'm using the Dlookup function to return the value from a table. The value is "0.05", in the table the fields format is number and decimal places set to 2. When I run the dlookup, it returns "0.0500000007450581". Where does it get this number from and why does it add on extra decimal places? Even if I put Round(Dlookup("","",""),2) it still displays all those decimal places.
3
2842
by: VivDenham | last post by:
Hi there I have a table - Projects - with 2 fields: Project ID (autonumber) and Project Name. I then have a 2nd table - Decorations Used - which contains 3 fields - Decorations Used Id; Project ID, and Decorations Name. The Project ID in this 2nd table is a Lookup field back to the table Projects. However, in the 2nd table, when I drop down the Combo list, the IDs have 2 decimal places, even though it is formatted to a Long Integer...
4
3259
by: mcupito | last post by:
In my table, a "Units" field may be 5.5157. In my query, I am trying to take that number and subtract 2 fields from it. The problem is, as soon as that number enters the query it is being rounded. I.e 5.5157 -> 6.0000 That being said, it also returns the wrong numbers in the calculated field also. The property sheet for the "Units": Format: Standard
0
8139
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8091
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8579
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8408
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7024
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6064
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5524
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4098
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1686
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.