473,508 Members | 2,295 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...would be grateful for any advice on this...thanks
Steve

Sep 4 '06 #1
4 2229
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.googlegrou ps.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...would 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*********************@i3g2000cwc.googlegrou ps.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...would 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.googlegr oups.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.googlegro ups.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...would 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.googlegr oups.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.googlegrou ps.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...would 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
2138
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...
3
1461
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...
1
1747
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...
7
6239
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...
2
2288
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...
10
2820
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...
2
1749
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'...
8
7143
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...
1
1779
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...
0
7332
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,...
1
7058
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...
0
5635
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,...
1
5057
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...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1565
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 ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
426
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...

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.