If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Access 2003 DCount Syntax Rookie
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'") -- Thanks |
#2
|
|||
|
|||
Access 2003 DCount Syntax Rookie
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" wrote: 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'") -- Thanks |
#3
|
|||
|
|||
Access 2003 DCount Syntax Rookie
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" wrote: 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" wrote: 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'") -- Thanks |
#4
|
|||
|
|||
Access 2003 DCount Syntax Rookie
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" wrote: 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" wrote: 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" wrote: 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'") -- Thanks |
#5
|
|||
|
|||
Access 2003 DCount Syntax Rookie
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" wrote: 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" wrote: 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" wrote: 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" wrote: 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'") -- Thanks |
Thread Tools | |
Display Modes | |
|
|