Access 2003 DCount Syntax Rookie

K

knowshowrosegrows

I am self-taught on this silly software - have lots of idiot books and I'm
taking a Intro to VB course and just beginning to understand syntax.

I am trying to do what seems to be a simple DCOUNT and I don't have it
right. I want to count the times in a specific date range that the records
in the Denial Specific Info Table has the First Level Appeal Determination
Field register "Denied."

My most recent attempt didnt even include the date range question and it is
not working
Expr1: DCount("[RecordID]","Denial Specific Info","[First Level Appeal
Determinations]='Denied'")
 
M

mscertified

Your best resource for syntax questions is the MS Access Heklp system since
it will answer almost any question you may have. Why do you have embedded
spaces in your table names and column names? Not a good idea! Try:

Expr1: DCount("[RecordID]","[Denial Specific Info]","[First Level Appeal
Determinations]='Denied'")

-Dorian
 
K

knowshowrosegrows

Thanks for your swift reply.

Of course the Access Help System is where I looked first. I'll take your
advice about the embedded spaces in the fields and tables.

Now, my Denial Specific Info table has three test records. One = "Denied"
and Two = "Granted." When I run the query with the syntax you offered I get
a table with one field titled Expr1. In that field there are three rows with
a "1" in each row. So it did count the number of "Denied" I have but it
repeated it for the same number of records in the original table.
--
Thanks


mscertified said:
Your best resource for syntax questions is the MS Access Heklp system since
it will answer almost any question you may have. Why do you have embedded
spaces in your table names and column names? Not a good idea! Try:

Expr1: DCount("[RecordID]","[Denial Specific Info]","[First Level Appeal
Determinations]='Denied'")

-Dorian

knowshowrosegrows said:
I am self-taught on this silly software - have lots of idiot books and I'm
taking a Intro to VB course and just beginning to understand syntax.

I am trying to do what seems to be a simple DCOUNT and I don't have it
right. I want to count the times in a specific date range that the records
in the Denial Specific Info Table has the First Level Appeal Determination
Field register "Denied."

My most recent attempt didnt even include the date range question and it is
not working
Expr1: DCount("[RecordID]","Denial Specific Info","[First Level Appeal
Determinations]='Denied'")
 
W

William Horton

I think all the "D" functions such as DCount are meant to be put on forms and
reports to show a total. Your DCount function did exactly what it was
supposed to do. It totaled the # of Denials. Yes, if you include this
function in a query or table listing all the records the result is going to
be the same for each table (unless you use a subquery that changes the
criteria for each record, but I don't think that is what you are trying to
accomplish). What is the purpose for counting the number of denials. if it
is to put the information on a report or form, put your DCount expression the
report or form and not the query.

I think that's right.

Hope this helps.

Bill

knowshowrosegrows said:
Thanks for your swift reply.

Of course the Access Help System is where I looked first. I'll take your
advice about the embedded spaces in the fields and tables.

Now, my Denial Specific Info table has three test records. One = "Denied"
and Two = "Granted." When I run the query with the syntax you offered I get
a table with one field titled Expr1. In that field there are three rows with
a "1" in each row. So it did count the number of "Denied" I have but it
repeated it for the same number of records in the original table.
--
Thanks


mscertified said:
Your best resource for syntax questions is the MS Access Heklp system since
it will answer almost any question you may have. Why do you have embedded
spaces in your table names and column names? Not a good idea! Try:

Expr1: DCount("[RecordID]","[Denial Specific Info]","[First Level Appeal
Determinations]='Denied'")

-Dorian

knowshowrosegrows said:
I am self-taught on this silly software - have lots of idiot books and I'm
taking a Intro to VB course and just beginning to understand syntax.

I am trying to do what seems to be a simple DCOUNT and I don't have it
right. I want to count the times in a specific date range that the records
in the Denial Specific Info Table has the First Level Appeal Determination
Field register "Denied."

My most recent attempt didnt even include the date range question and it is
not working
Expr1: DCount("[RecordID]","Denial Specific Info","[First Level Appeal
Determinations]='Denied'")
 
K

knowshowrosegrows

Yes William, I am ultimately putting this in a report. I am such a rookie
that I assumed it would be easier to collect it in a query and then make the
report from that. Is there something i should write in the report control to
count this data?

--
Thanks


William Horton said:
I think all the "D" functions such as DCount are meant to be put on forms and
reports to show a total. Your DCount function did exactly what it was
supposed to do. It totaled the # of Denials. Yes, if you include this
function in a query or table listing all the records the result is going to
be the same for each table (unless you use a subquery that changes the
criteria for each record, but I don't think that is what you are trying to
accomplish). What is the purpose for counting the number of denials. if it
is to put the information on a report or form, put your DCount expression the
report or form and not the query.

I think that's right.

Hope this helps.

Bill

knowshowrosegrows said:
Thanks for your swift reply.

Of course the Access Help System is where I looked first. I'll take your
advice about the embedded spaces in the fields and tables.

Now, my Denial Specific Info table has three test records. One = "Denied"
and Two = "Granted." When I run the query with the syntax you offered I get
a table with one field titled Expr1. In that field there are three rows with
a "1" in each row. So it did count the number of "Denied" I have but it
repeated it for the same number of records in the original table.
--
Thanks


mscertified said:
Your best resource for syntax questions is the MS Access Heklp system since
it will answer almost any question you may have. Why do you have embedded
spaces in your table names and column names? Not a good idea! Try:

Expr1: DCount("[RecordID]","[Denial Specific Info]","[First Level Appeal
Determinations]='Denied'")

-Dorian

:

I am self-taught on this silly software - have lots of idiot books and I'm
taking a Intro to VB course and just beginning to understand syntax.

I am trying to do what seems to be a simple DCOUNT and I don't have it
right. I want to count the times in a specific date range that the records
in the Denial Specific Info Table has the First Level Appeal Determination
Field register "Denied."

My most recent attempt didnt even include the date range question and it is
not working
Expr1: DCount("[RecordID]","Denial Specific Info","[First Level Appeal
Determinations]='Denied'")
 

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

Similar Threads


Top