473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

DSum rounding issue

I am currently using the dsum function to add some fields together given certain criteria. The issue im comining across is this: when the dsum function operates, it automatically rounds the final number. The fields settings are as follows:
Data Type: Number
field size: Single
decimal places: 2

the code looks like this:
HRa= Dsum ("[Hours Requested]","TableName", "[fieldname1] = '" & VariableCriteria &"' and [fieldname2] = '" & Variable Criteria & "'")

(I left out the actually field and table names because the might be consider sensitive information, better safe than sorry!)

the number should come out either as a whole number, x.5, x.25 or x.75, however all i get is a rounded whole number... any help?
Jun 5 '10 #1
2 3152
missinglinq
3,532 Expert 2GB
Never heard of field and table names being considered sensitive information! Thought something had to first be information before it could be sensitive information!

The fact that the result is coming out a whole number would tend to indicate that HRa is defined as an Integer in the underlying table or at the form level. I'd double check this, first off.

Welcome to Bytes!

Linq ;0)>
Jun 5 '10 #2
@missinglinq
Thanks for the welcome!

As far as sensitive information goes, i dont want to screw around with OPSEC, so...i just dont risk it.

I re-checked both the form and underlying table. The form input is a text box bound to the underlying field. The underlying field is definatly set to single,general number,2 (Field size, format and decimal places, respectivaly). I'm really stumped on this one. Everything i looked up about dsum says it shouldn't round any final results, it should just add the fields together, so I really dont know whats going on? I suppose i could put together a loop statement or something, but if its an underlying format issue, that wont solve it. HRa shows up on the table with decimals... and the math is correct, just rounded up if it should in in .5. Any other ideas?
Jun 6 '10 #3

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

Similar topics

1
by: Marc Aube | last post by:
Is there a web site that can ofer some help. The quotation marks are posing an issue as well as other items for this function. I have some books but they are not consistent in their use of the code...
1
by: phaddock4 | last post by:
Being fairly inexperienced at Access 2000, i've been reading many posts here for the last several days, and testing myself to find the best approach to do the following in A2K: SET UP: I have...
4
by: Kelly Mah | last post by:
Sorry if I got the wrong group. I seem to be running into a rounding issue on a Linux AS2.1 box using gcc 2.95. This program always returns 419 on Linux, but on a Solaris machine, I get the...
11
by: cj | last post by:
Lets assume all calculations are done with decimal data types so things are as precise as possible. When it comes to the final rounding to cut a check to pay dividends for example in VB rounding...
5
by: Cygnus | last post by:
Sorry in advance for the lack of formatting in this posting. Data: (column headers) Net Sales | Royalty Rate | Total Royalty (data) 4.31 | 50.00% | 2.15 19.35 | 50.00% | 9.68
4
by: Altman | last post by:
I am having a rounding problem all over the place and am struggling to fix it. My problem is that I have an unit price and a quantity. When I multiply them together they come out to 3.705. I...
4
by: AMDRIT | last post by:
Given: ?System.Math.Round(161.5D,0) 162.0 ?System.Math.Round(162.5D,0) 162.0 ?System.Math.Round(163.5D,0) 164.0 In either C# '05 or VB.Net '05, can anyone explain the inconsistancy? Is
3
by: technocraze | last post by:
Hi community experts, I am having an isue with Dsum function that is used to count the total number for a particular field (intake) at the textbox afterupdate event with condition/ criteria...
1
by: Jayanti Patel | last post by:
Hi All, Issue: In SQL Server 2005. Round (2.5) will give -3 Round (-2.5) will give -3 But in Reality the -3 need to be -2. how can we make a custom round function that gives the correct...
3
patjones
by: patjones | last post by:
Good morning all: In what seems like an ongoing saga to make the DSum function do what I need it to, I am now having trouble with a user-defined function in my VBA module. Here's the offending...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.