Connecting Tech Pros Worldwide Help | Site Map

Totals problem with subform

 
LinkBack Thread Tools Search this Thread
  #1  
Old September 4th, 2006, 11:25 AM
Steve_s
Guest
 
Posts: n/a
Default 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


  #2  
Old September 4th, 2006, 12:25 PM
Ed Robichaud
Guest
 
Posts: n/a
Default Re: Totals problem with subform

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" <stevesutherland@blueyonder.co.ukwrote in message
news:1157369567.764156.30430@i3g2000cwc.googlegrou ps.com...
Quote:
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
>

  #3  
Old September 4th, 2006, 02:45 PM
Steve_s
Guest
 
Posts: n/a
Default Re: Totals problem with subform

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:
Quote:
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" <stevesutherland@blueyonder.co.ukwrote in message
news:1157369567.764156.30430@i3g2000cwc.googlegrou ps.com...
Quote:
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
  #4  
Old September 4th, 2006, 06:55 PM
Ed Robichaud
Guest
 
Posts: n/a
Default Re: Totals problem with subform

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" <stevesutherland@blueyonder.co.ukwrote in message
news:1157381527.179574.118390@p79g2000cwp.googlegr oups.com...
Quote:
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:
Quote:
>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" <stevesutherland@blueyonder.co.ukwrote in message
>news:1157369567.764156.30430@i3g2000cwc.googlegro ups.com...
Quote:
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
>
>

  #5  
Old September 4th, 2006, 07:25 PM
Steve_s
Guest
 
Posts: n/a
Default Re: Totals problem with subform

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:
Quote:
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" <stevesutherland@blueyonder.co.ukwrote in message
news:1157381527.179574.118390@p79g2000cwp.googlegr oups.com...
Quote:
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:
Quote:
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" <stevesutherland@blueyonder.co.ukwrote in message
news:1157369567.764156.30430@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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.