473,669 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Totals problem with subform

Hi

I am having problems totalling a particular field in a subform.I am
using Access 2003. The subform is based on a query which selects
records with various financial information. I have 5 text boxes in the
form footer which total certain fields. I have no problem totalling 4
of the fields, but one field which is a calculated field ( ie gross
cash - commisions= nett) rounds the figure down ie 175.85 becomes
175.00... I have tried everything to correct this..I have checked the
tables and the query to ensure that the field is formatted and the
query returns the correct value when it is run, however the total is
always incorrect...wou ld be grateful for any advice on this...thanks
Steve

Sep 4 '06 #1
4 2237
Your table fields used in the calculated control - [gross cash] and
[commissions] must be data type of either decimal, currency or single. If
one or both is an integer, then you will always get whole numbers, no matter
how many decimal places are set in the format properties.
-Ed

"teve_s" <st************ *@blueyonder.co .ukwrote in message
news:11******** *************@i 3g2000cwc.googl egroups.com...
Hi

I am having problems totalling a particular field in a subform.I am
using Access 2003. The subform is based on a query which selects
records with various financial information. I have 5 text boxes in the
form footer which total certain fields. I have no problem totalling 4
of the fields, but one field which is a calculated field ( ie gross
cash - commisions= nett) rounds the figure down ie 175.85 becomes
175.00... I have tried everything to correct this..I have checked the
tables and the query to ensure that the field is formatted and the
query returns the correct value when it is run, however the total is
always incorrect...wou ld be grateful for any advice on this...thanks
Steve

Sep 4 '06 #2
Hi Ed

Thanks for your response. The table fields are decimal and the actual
query returns the correctly calculated figure for each record...it is
only the totals text box in the footer of the subform which is shows
the incorrcet toatl figure...any other ideas?
Regards

Steve

Ed Robichaud wrote:
Your table fields used in the calculated control - [gross cash] and
[commissions] must be data type of either decimal, currency or single. If
one or both is an integer, then you will always get whole numbers, no matter
how many decimal places are set in the format properties.
-Ed

"teve_s" <st************ *@blueyonder.co .ukwrote in message
news:11******** *************@i 3g2000cwc.googl egroups.com...
Hi

I am having problems totalling a particular field in a subform.I am
using Access 2003. The subform is based on a query which selects
records with various financial information. I have 5 text boxes in the
form footer which total certain fields. I have no problem totalling 4
of the fields, but one field which is a calculated field ( ie gross
cash - commisions= nett) rounds the figure down ie 175.85 becomes
175.00... I have tried everything to correct this..I have checked the
tables and the query to ensure that the field is formatted and the
query returns the correct value when it is run, however the total is
always incorrect...wou ld be grateful for any advice on this...thanks
Steve
Sep 4 '06 #3
Make sure that the format property of your calculated control and/or query
field is "standard" and decimal places set to "2".

Also the "decimal" field type has been know to cause errors. Try changing
it to "single" or "double".
-Ed

"Steve_s" <st************ *@blueyonder.co .ukwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Hi Ed

Thanks for your response. The table fields are decimal and the actual
query returns the correctly calculated figure for each record...it is
only the totals text box in the footer of the subform which is shows
the incorrcet toatl figure...any other ideas?
Regards

Steve

Ed Robichaud wrote:
>Your table fields used in the calculated control - [gross cash] and
[commissions] must be data type of either decimal, currency or single.
If
one or both is an integer, then you will always get whole numbers, no
matter
how many decimal places are set in the format properties.
-Ed

"teve_s" <st************ *@blueyonder.co .ukwrote in message
news:11******* **************@ i3g2000cwc.goog legroups.com...
Hi

I am having problems totalling a particular field in a subform.I am
using Access 2003. The subform is based on a query which selects
records with various financial information. I have 5 text boxes in the
form footer which total certain fields. I have no problem totalling 4
of the fields, but one field which is a calculated field ( ie gross
cash - commisions= nett) rounds the figure down ie 175.85 becomes
175.00... I have tried everything to correct this..I have checked the
tables and the query to ensure that the field is formatted and the
query returns the correct value when it is run, however the total is
always incorrect...wou ld be grateful for any advice on this...thanks
Steve

Sep 4 '06 #4
Hi Ed

Changed the source tables data type to double and the problem
disappeared!... thanks for your help..very much appreciated..I have
almost the same database which I used in access 2000 with similar
calculated fields and did not have any issues , maybe this is an access
2003 specific issue...thanks again

Regards
Steve
Ed Robichaud wrote:
Make sure that the format property of your calculated control and/or query
field is "standard" and decimal places set to "2".

Also the "decimal" field type has been know to cause errors. Try changing
it to "single" or "double".
-Ed

"Steve_s" <st************ *@blueyonder.co .ukwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Hi Ed

Thanks for your response. The table fields are decimal and the actual
query returns the correctly calculated figure for each record...it is
only the totals text box in the footer of the subform which is shows
the incorrcet toatl figure...any other ideas?
Regards

Steve

Ed Robichaud wrote:
Your table fields used in the calculated control - [gross cash] and
[commissions] must be data type of either decimal, currency or single.
If
one or both is an integer, then you will always get whole numbers, no
matter
how many decimal places are set in the format properties.
-Ed

"teve_s" <st************ *@blueyonder.co .ukwrote in message
news:11******** *************@i 3g2000cwc.googl egroups.com...
Hi

I am having problems totalling a particular field in a subform.I am
using Access 2003. The subform is based on a query which selects
records with various financial information. I have 5 text boxes in the
form footer which total certain fields. I have no problem totalling 4
of the fields, but one field which is a calculated field ( ie gross
cash - commisions= nett) rounds the figure down ie 175.85 becomes
175.00... I have tried everything to correct this..I have checked the
tables and the query to ensure that the field is formatted and the
query returns the correct value when it is run, however the total is
always incorrect...wou ld be grateful for any advice on this...thanks
Steve
Sep 4 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2145
by: Nothing | last post by:
I have a main report with several sub-reports on it. Some of the sub-reports are hidden some are visible. A few of the sub-reports hve totals calculated on them. I have a control in the sub-report footer that has a total in it. When I try to reference that control on the main reports header section it seems to be reading just one line of the detail in the sub-report. Not the control with the total. For the life me I can not figure out...
3
1466
by: Karl Roes | last post by:
Hi All, I would also like some help with form filtered differences in totals. I have a main form for the client, and a continuous subform listing client transactions. The subform can be filtered by several fields. I have set up several text boxes which programatically show various OnCurrent subtotal details depending on the filtered options in the continuous subform.
1
1767
by: oncewaswillow | last post by:
Hi, I have 3 nested forms and want to calculate a total on the first subform (as the form loads)by adding 2 fields from that form + to a field on the second subform. Second subform is and control is Sumpd. I use this =.Form!Sumpd++ which works well as long as the transactiontbl subform has records in
7
6257
by: Ken Mylar | last post by:
First a quick background on the form: I have a form that is normally viewed in Single form mode. It has a subform on it that is in datasheet view. The main form is for work orders and the subform is for parts used on the work order. On the main form I have a LaborTotal (from main form), PartsTotal (from subform) and TotalCost (which is Labor + Parts). All works fine as is. Now to the question: I have a button on my main form to browse...
2
2303
by: Tim Marshall | last post by:
Wondering if anyone has any suggestions for this. Sometimes in the form reports my users run, a data sheet subform on a main form, with totals in text boxes with calculated controlsources (=sum(whatever)), the records returned are large. By "large" I mean that there is a significant lag time before the totals get calculated and display. Lag time and what constitutes "large" varies with the user's PC hardware/configuration.
10
2837
by: rdemyan via AccessMonster.com | last post by:
I have a subform that displays around 10 fields. Most of the values shown result from some complex calculations. To make it easy, I have stored the results in a temporary table and then all I need to do is set the recordsource of the subform equal to the table. However, it would be very nice if the last row in the subform showed the totals of the previous rows (of course where applicable). If it were a listbox (that didn't require...
2
1765
by: Ron | last post by:
Hi All, I've got a main form (frmMain) with 5 subforms on it. All subforms are linked to different hidden controls on frmMain. The purpose of this form is to record payments by 'source' (batches) so frmMain's source is a query on BatchPaymentID. New 'source' for payment, new BatchPaymentID. 1st subform (sfrmOne) is a client list of just the client's that would have that source of payment. Next subform (sfrmTwo) is a list of charges...
8
7164
by: elias.farah | last post by:
Hello Everyone, I'm having some very weird behavior on a couple of Access forms. (Not all forms, just some of them). The forms have been working for years, under Access XP/2003 etc, and last week upgraded from Windows XP/Office 2003 to Vista x64/Office 2007. Under Access 2007, a couple of forms are now taking 60 seconds to
1
1786
by: csolomon | last post by:
Happy Friday! I was wondering if you can have more than one total in the footer. I ask this because when I set up one of my totals in the footer (lets call it total1), it works (slowly but it works)...but when I set up the other one (total2), I get an error for the total1 value and an error for the total2 value. I have a function, GetYield, that returns a calculation based on the material chosen (matType). Public Function...
0
8465
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
8383
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,...
1
8588
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7407
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...
0
5682
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
4386
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2797
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2032
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.