PC Review


Reply
Thread Tools Rate Thread

Sum of a field from Crosstab Query

 
 
DZ
Guest
Posts: n/a
 
      8th Jul 2008
Hi

I have a form whose record source is a Crosstable query.

Several columns of data in the form (and underlying CrossTab Query ) are
numeric and in the form footer I have text box, txtTotal, with
"= Sum([txtNumericCol1])" as the control source.

txtNumericCol1 is a text box in the Detail section whose ControlSource is a
numeric field from the underlying CrossTab Query.

txtTotal displays #Error.

But...If I set txtTotal control source to simply "= [txtNumericCol1]", then
txtTotal displays the correct value from the current record.

I want txtTotal to display the total but I'm getting an error.

I tried using DomaineAggregate functions and I am able to get the totals
that way but there is alot of data and they are extremely low (They take 15
to 20 second to display the total)

Thanks
I will credit any helpful responses

 
Reply With Quote
 
 
 
 
Graham Mandeno
Guest
Posts: n/a
 
      9th Jul 2008
Hi DZ

Instead of using the control name (txtNumericCol1) in the Sum expression,
use the actual field name that is the ControlSource of txtNumericCol1.
--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand

"DZ" <(E-Mail Removed)> wrote in message
news:29F5FF91-31E2-43BC-B554-(E-Mail Removed)...
> Hi
>
> I have a form whose record source is a Crosstable query.
>
> Several columns of data in the form (and underlying CrossTab Query ) are
> numeric and in the form footer I have text box, txtTotal, with
> "= Sum([txtNumericCol1])" as the control source.
>
> txtNumericCol1 is a text box in the Detail section whose ControlSource is
> a
> numeric field from the underlying CrossTab Query.
>
> txtTotal displays #Error.
>
> But...If I set txtTotal control source to simply "= [txtNumericCol1]",
> then
> txtTotal displays the correct value from the current record.
>
> I want txtTotal to display the total but I'm getting an error.
>
> I tried using DomaineAggregate functions and I am able to get the totals
> that way but there is alot of data and they are extremely low (They take
> 15
> to 20 second to display the total)
>
> Thanks
> I will credit any helpful responses
>



 
Reply With Quote
 
DZ
Guest
Posts: n/a
 
      9th Jul 2008
Yws. That worked ! Great

I always thought that you were supposed to refer to controls when doing
calculations from text boxes on forms and reports ???

Any enlightenment on this would be appreciated




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crosstab query is no longer crosstab when I include field (in repo Ben8765 Microsoft Access Reports 1 15th Oct 2009 11:01 PM
Missing Row Field in Crosstab Query Bart Microsoft Access Queries 0 10th Feb 2009 07:28 AM
Sum Calculated Field in Crosstab Query =?Utf-8?B?SmVyaQ==?= Microsoft Access Queries 4 25th Jul 2007 02:18 AM
Crosstab query - odd field SusanV Microsoft Access Queries 2 19th Sep 2005 03:27 PM
Re: Crosstab Query does not recognize field name MGFoster Microsoft Access Queries 3 5th May 2004 09:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 AM.