Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

DSum Countrol Source Help

 
   Windows Help (Home) -> Microsoft Access RSS
Next:  Meta tags in webpages  
Author Message
e.winterod

External


Since: Jan 28, 2010
Posts: 4



(Msg. 1) Posted: Thu Jan 28, 2010 10:22 am
Post subject: DSum Countrol Source Help
Archived from groups: microsoft>public>access (more info?)

I am a relatively new Access Database developer, I am becoming more familiar
with the tool/calculations but I am having trouble figuring out why I get the
#Error when using the DSum Calcultion.

I have an unbound text box on a Form, backed by a query.
The goal is to count the [# of Pages Published] for each [Action], example
"New".

The calculation I am entering is:

=DSum("[# of Pages After]","qry_Form_DocDashbaord","[Action]=""New""")

I have gone into my table to verify:

1. [# of Pages After] is a Number field.
2. [Action] is a Text Field.
3. There are no null values.

I have also tried it with qry_Form_DocDashboard is in brackets, and still
get the same results.

Please help, I have searched the internet at other problems/answers and cant
figure out what I am doing wrong.

Thanks!

 >> Stay informed about: DSum Countrol Source Help 
Back to top
Login to vote
Lynn Trapp

External


Since: Jan 28, 2010
Posts: 1



(Msg. 2) Posted: Thu Jan 28, 2010 10:38 am
Post subject: RE: DSum Countrol Source Help
Archived from groups: per prev. post (more info?)

Try this instead

=DSum("[# of Pages After]","qry_Form_DocDashbaord","[Action]= " & "New")

 >> Stay informed about: DSum Countrol Source Help 
Back to top
Login to vote
e.winterod

External


Since: Jan 28, 2010
Posts: 4



(Msg. 3) Posted: Thu Jan 28, 2010 11:34 am
Post subject: RE: DSum Countrol Source Help
Archived from groups: per prev. post (more info?)

I tried the expressions in both replies

=DSum("[# of Pages After]","qry_Form_DocDashboard","[Action]=""New""")

And

=DSum("[# of Pages After]","qry_Form_DocDashbaord","[Action]= " & "New")

I continue to get the #Error message Sad
 >> Stay informed about: DSum Countrol Source Help 
Back to top
Login to vote
e.winterod

External


Since: Jan 28, 2010
Posts: 4



(Msg. 4) Posted: Thu Jan 28, 2010 11:58 am
Post subject: RE: DSum Countrol Source Help
Archived from groups: per prev. post (more info?)

I was able to ask my supervisor for help and he gave me the following as an
alternative:

=Sum(IIf([qry_Form_DocDashboard]![Action]="Delete",[qry_Form_DocDashboard]![# Pages After]))

This works, but I would still like troubleshooting on why the DSum doesnt
work. Thanks!!
 >> Stay informed about: DSum Countrol Source Help 
Back to top
Login to vote
KenSheridan via AccessMon

External


Since: Aug 17, 2009
Posts: 20



(Msg. 5) Posted: Thu Jan 28, 2010 3:25 pm
Post subject: Re: DSum Countrol Source Help
Archived from groups: per prev. post (more info?)

If the expression is as you've posted it the query name appears to be
misspelt. I think it should be:

=DSum("[# of Pages After]","qry_Form_DocDashboard","[Action]=""New""")

Ken Sheridan
Stafford, England

e.winterod wrote:
>I am a relatively new Access Database developer, I am becoming more familiar
>with the tool/calculations but I am having trouble figuring out why I get the
>#Error when using the DSum Calcultion.
>
>I have an unbound text box on a Form, backed by a query.
>The goal is to count the [# of Pages Published] for each [Action], example
>"New".
>
>The calculation I am entering is:
>
>=DSum("[# of Pages After]","qry_Form_DocDashbaord","[Action]=""New""")
>
>I have gone into my table to verify:
>
>1. [# of Pages After] is a Number field.
>2. [Action] is a Text Field.
>3. There are no null values.
>
>I have also tried it with qry_Form_DocDashboard is in brackets, and still
>get the same results.
>
>Please help, I have searched the internet at other problems/answers and cant
>figure out what I am doing wrong.
>
>Thanks!
 >> Stay informed about: DSum Countrol Source Help 
Back to top
Login to vote
KenSheridan via AccessMon

External


Since: Aug 17, 2009
Posts: 20



(Msg. 6) Posted: Thu Jan 28, 2010 5:25 pm
Post subject: RE: DSum Countrol Source Help
Archived from groups: per prev. post (more info?)

I can't see any obvious error in the original expression once the spelling is
corrected. Does the query include any parameters? That might explain it.

Your new expression will work, but you don't need to specify the query and
you should really include the third argument for the IIf function:

=Sum(IIf([Action]="Delete", [# Pages After],Null))

Another way would be:

=Sum(IIf([Action]="Delete",1,0)*[# Pages After])

Ken Sheridan
Stafford, England

e.winterod wrote:
>I was able to ask my supervisor for help and he gave me the following as an
>alternative:
>
>=Sum(IIf([qry_Form_DocDashboard]![Action]="Delete",[qry_Form_DocDashboard]![# Pages After]))
>
>This works, but I would still like troubleshooting on why the DSum doesnt
>work. Thanks!!
 >> Stay informed about: DSum Countrol Source Help 
Back to top
Login to vote
e.winterod

External


Since: Jan 28, 2010
Posts: 4



(Msg. 7) Posted: Fri Jan 29, 2010 6:51 am
Post subject: RE: DSum Countrol Source Help
Archived from groups: per prev. post (more info?)

I verified that the query doesnt have any parameters set.

Thank you for all of your help !!

Ellen

"KenSheridan via AccessMonster.com" wrote:

> I can't see any obvious error in the original expression once the spelling is
> corrected. Does the query include any parameters? That might explain it.
>
> Your new expression will work, but you don't need to specify the query and
> you should really include the third argument for the IIf function:
>
> =Sum(IIf([Action]="Delete", [# Pages After],Null))
>
> Another way would be:
>
> =Sum(IIf([Action]="Delete",1,0)*[# Pages After])
>
> Ken Sheridan
> Stafford, England
 >> Stay informed about: DSum Countrol Source Help 
Back to top
Login to vote
KenSheridan via AccessMon

External


Since: Aug 17, 2009
Posts: 20



(Msg. 8) Posted: Fri Jan 29, 2010 1:25 pm
Post subject: RE: DSum Countrol Source Help
Archived from groups: per prev. post (more info?)

Ellen:

Beats me, I'm afraid. If you care to post the SQL of the query (and any
queries which it draws upon) it might give us a clue, but at first sight I
can't see why your original expression didn't work.

Ken Sheridan
Stafford, England

e.winterod wrote:
>I verified that the query doesnt have any parameters set.
>
>Thank you for all of your help !!
>
>Ellen
>
>> I can't see any obvious error in the original expression once the spelling is
>> corrected. Does the query include any parameters? That might explain it.
>[quoted text clipped - 10 lines]
>> Ken Sheridan
>> Stafford, England
 >> Stay informed about: DSum Countrol Source Help 
Back to top
Login to vote
JimfromIndy

External


Since: Feb 1, 2010
Posts: 1



(Msg. 9) Posted: Mon Feb 01, 2010 1:05 pm
Post subject: Re: DSum Countrol Source Help
Archived from groups: per prev. post (more info?)

On Jan 29, 11:53 am, "KenSheridan via AccessMonster.com"
wrote:
> Ellen:
>
> Beats me, I'm afraid.  If you care to post the SQL of the query (and any
> queries which it draws upon) it might give us a clue, but at first sight I
> can't see why your original expression didn't work.
>
> Ken Sheridan
> Stafford, England
>
> e.winterod wrote:
> >I verified that the query doesnt have any parameters set.
>
> >Thank you for all of your help !!
>
> >Ellen
>
> >> I can't see any obvious error in the original expression once the spelling is
> >> corrected.  Does the query include any parameters?  That might explain it.
> >[quoted text clipped - 10 lines]
> >> Ken Sheridan
> >> Stafford, England
>
> --
> Message posted via[URL="http://www.accessmonster.com"]http://www.accessmonster.com[/URL]

Try the following:

=DSum("[# of Pages After]","qry_Form_DocDashbaord","[Action]='New'")
 >> Stay informed about: DSum Countrol Source Help 
Back to top
Login to vote
KenSheridan via AccessMon

External


Since: Aug 17, 2009
Posts: 20



(Msg. 10) Posted: Mon Feb 01, 2010 5:25 pm
Post subject: Re: DSum Countrol Source Help
Archived from groups: per prev. post (more info?)

It shouldn't make any difference. A pair of contiguous quotes within a
string expression is interpreted as a literal quotes character. I would
normally use that rather than a single quote character as a text value is on
the whole more likely to have an apostrophe in it than a quotes character,
particularly for us Irishmen. My name in its original Irish form for
instance would be Cináed O'Siridean, though I've resisted the current fashion
amongst some more nationalistically inclined members of the Celtic fringe to
revert to the original form.

There is probably a rational explanation for the error, but without being
able to do some hands on debugging I can't see it.

Ken Sheridan
Stafford, England

JimfromIndy wrote:
>On Jan 29, 11:53 am, "KenSheridan via AccessMonster.com" wrote:
>> Ellen:
>>
>[quoted text clipped - 19 lines]
>> --
>> Message posted via[URL="http://www.accessmonster.com"]http://www.accessmonster.com[/URL]
>
>Try the following:
>
>=DSum("[# of Pages After]","qry_Form_DocDashbaord","[Action]='New'")
 >> Stay informed about: DSum Countrol Source Help 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Can't see replies to questions from this source - I'm having trouble with yes/no check boxes. Somehow they get changed from a check box to a text box. I've posed this question before (yesterday) and received notice of a reply. But I can't see the reply. When I click on the hyperlink, I get a blank..

Microsoft Office - Can you update Microsoft office version 2003 to 2007 or do you have to buy the newer version

From access to word - Print - Hello, We open word letter from access with hiperlink code. . . .. . . Application.FollowHyperlink "h:\DRISHOT\" & lettername & ".doc" Is it possible to print the letter instead of open it ? How ? thank you

the setting for this property is too long - Hello. I was running the Access performance option and for some forms and reports there was a message with this: the setting for this property is too long what is this? what should I fix in order to not receive this error. Regards, Marco

Me.Name results in "Invalid procedure call or argument" - I am debugging an Access application written by someone else. In Access 2003 it behaves OK, but the client needs to upgrade to Access 2007 for various reasons. When the app is run in Access 2007 I get a few niggles that I have been working through, but..
   Windows Help (Home) -> Microsoft Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]