DSum #Error

G

Guest

I am working on a database for a non profit organization. I need to get my
form to add a few numbers for the clients. I am using both DCount and DSum,
however my DSum functions are not working.

Here is what I have in an unbound text box:

=DSum("[Council_Sessions]","Compile","[Gender_VI]='Male'"

The Council_Sessions field is a numaric field.

--
~Youth is lost without wisdom
(*DBF
*)===
Margaret
Balambao
 
F

fredg

I am working on a database for a non profit organization. I need to get my
form to add a few numbers for the clients. I am using both DCount and DSum,
however my DSum functions are not working.

Here is what I have in an unbound text box:

=DSum("[Council_Sessions]","Compile","[Gender_VI]='Male'"

The Council_Sessions field is a numaric field.

1) Make sure the name of this control is not the same as any field
used within this expression.
2) Is [Gender_VI] actually a text datatype, or is it a yes/no or other
number datatype field (such as a Look-up field)?
If it is not Text datatype, then "[Gender_VI] = -1" (or any other
number without the ' around it).
 
G

Guest

I assume that it a typo that it missing a closing brackets

=DSum("[Council_Sessions]","Compile","[Gender_VI]='Male'")

I would check again the fields and table name
 
G

Guest

Margaret,

You seem to be missing the closing parenthesis. It's also easier to avoid a
syntax error if you put single quotes enclosed in double quotes on either
side of your value:

If Gender_VI is a text field, try

=DSum("[Council_Sessions]","Compile","[Gender_VI]=" & "'" & "Male" & "'")

It is a numeric field, let's say the value 1 corresponds to "Male". Try:

=DSum("[Council_Sessions]","Compile","[Gender_VI]= 1")

Hope that helps.
Sprinks
 
G

Guest

Oops it was a typo in the post. I have the necessary brackets, Any other ideas?
--
~Youth is lost without wisdom
(*DBF
*)===
Margaret
Balambao


Ofer Cohen said:
I assume that it a typo that it missing a closing brackets

=DSum("[Council_Sessions]","Compile","[Gender_VI]='Male'")

I would check again the fields and table name

--
Good Luck
BS"D


Margaret Balambao said:
I am working on a database for a non profit organization. I need to get my
form to add a few numbers for the clients. I am using both DCount and DSum,
however my DSum functions are not working.

Here is what I have in an unbound text box:

=DSum("[Council_Sessions]","Compile","[Gender_VI]='Male'"

The Council_Sessions field is a numaric field.

--
~Youth is lost without wisdom
(*DBF
*)===
Margaret
Balambao
 
G

Guest

The [Gender_VI] Field is a Text data type and the name of the control is
Text125.
--
~Youth is lost without wisdom
(*DBF
*)===
Margaret
Balambao


fredg said:
I am working on a database for a non profit organization. I need to get my
form to add a few numbers for the clients. I am using both DCount and DSum,
however my DSum functions are not working.

Here is what I have in an unbound text box:

=DSum("[Council_Sessions]","Compile","[Gender_VI]='Male'"

The Council_Sessions field is a numaric field.

1) Make sure the name of this control is not the same as any field
used within this expression.
2) Is [Gender_VI] actually a text datatype, or is it a yes/no or other
number datatype field (such as a Look-up field)?
If it is not Text datatype, then "[Gender_VI] = -1" (or any other
number without the ' around it).
 
G

Guest

I entered:
=DSum("[Council_Sessions]","Compile","[Gender_VI]=" & "'" & "Male" & "'")

The #Error still persists.
Thank you anyhow
Any other Suggestions ?
--
~Youth is lost without wisdom
(*DBF
*)===
Margaret
Balambao


Sprinks said:
Margaret,

You seem to be missing the closing parenthesis. It's also easier to avoid a
syntax error if you put single quotes enclosed in double quotes on either
side of your value:

If Gender_VI is a text field, try

=DSum("[Council_Sessions]","Compile","[Gender_VI]=" & "'" & "Male" & "'")

It is a numeric field, let's say the value 1 corresponds to "Male". Try:

=DSum("[Council_Sessions]","Compile","[Gender_VI]= 1")

Hope that helps.
Sprinks


Margaret Balambao said:
I am working on a database for a non profit organization. I need to get my
form to add a few numbers for the clients. I am using both DCount and DSum,
however my DSum functions are not working.

Here is what I have in an unbound text box:

=DSum("[Council_Sessions]","Compile","[Gender_VI]='Male'"

The Council_Sessions field is a numaric field.

--
~Youth is lost without wisdom
(*DBF
*)===
Margaret
Balambao
 
G

Guest

Margaret,

Your syntax appears to be correct. The only other advice I can offer is to
verify that:

- Council_Sessions is a numeric field in the table or query named Compile
- Gender_VI is a text field in the same source
- If you look at the table in table view, there exist records where
Council_Sessions is non-null and Gender_VI = "Male"

Good luck.
Sprinks

Margaret Balambao said:
I entered:
=DSum("[Council_Sessions]","Compile","[Gender_VI]=" & "'" & "Male" & "'")

The #Error still persists.
Thank you anyhow
Any other Suggestions ?
--
~Youth is lost without wisdom
(*DBF
*)===
Margaret
Balambao


Sprinks said:
Margaret,

You seem to be missing the closing parenthesis. It's also easier to avoid a
syntax error if you put single quotes enclosed in double quotes on either
side of your value:

If Gender_VI is a text field, try

=DSum("[Council_Sessions]","Compile","[Gender_VI]=" & "'" & "Male" & "'")

It is a numeric field, let's say the value 1 corresponds to "Male". Try:

=DSum("[Council_Sessions]","Compile","[Gender_VI]= 1")

Hope that helps.
Sprinks


Margaret Balambao said:
I am working on a database for a non profit organization. I need to get my
form to add a few numbers for the clients. I am using both DCount and DSum,
however my DSum functions are not working.

Here is what I have in an unbound text box:

=DSum("[Council_Sessions]","Compile","[Gender_VI]='Male'"

The Council_Sessions field is a numaric field.

--
~Youth is lost without wisdom
(*DBF
*)===
Margaret
Balambao
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top