cmasteller
Jan 25 2006, 06:03 PM
Could someone point out what I am doing wrong with the following control expression:
=Count([EntryType])="Rejected"
I'm trying to get a count of of all Rejected Referals, there are 5 in the query right now but I keep getting a value of 0 on my form.
Mucho Mahalo;
Charles
Jack Cowley
Jan 25 2006, 06:18 PM
= DCount("[EntryType]", "NameOfQuery", "[EntryType] = 'Rejected'")
You might want to consider using a boolean field instead if the only possibilities are Rejected or Not Rejected. If there is more than two possibilities then consider an Option Group and store a number in the EnteryType field...
hth,
Jack
cmasteller
Jan 25 2006, 06:39 PM
Hey Jack, glad to see all the rain out there didn't wash you away. Thanks for the suggestion, one question though, the form I am working on is bound to the query already, so I shouldn't need "NameOfQuery" should I.
Jack Cowley
Jan 25 2006, 06:44 PM
If the query is filtered so it is only showing the 5 records then you only need
=Count([EntryType])
But if there are other records as well then DCount will count the records where EntryType = Rejected. DCount and Count are not the same...
Yep, we had lots of rain and my back yard is still a bog and more rain is on its way, but I don't think it will amount to much...
Jack
cmasteller
Jan 25 2006, 07:02 PM
Now I'm getting #Error# with: =DCount("[EntryType]","[EntryType] = 'Pending'") any ideas, and yes I guess I will need to use DCount because I have records with three different entires, Pending, Accepted, and Rejected. I'm trying to come up with counts for each.
Thanks
Charles
Jack Cowley
Jan 25 2006, 07:07 PM
You did not put in the name of the query in your code:
=DCount("[EntryType]", "NameOfQuery", "[EntryType] = 'Pending'")
Jack
cmasteller
Jan 25 2006, 07:11 PM
OOPS!! Thought since the form was bound to the query I didn't need that. Entered the query name as you suggested and it worked like a charm.
Thanks again Jack, I only hope that someday I can return the favor for all the help you've given me.
Stay Dry:
Charles
Jack Cowley
Jan 25 2006, 07:19 PM
Charles -
I am glad to help. When you use any of the domain aggragate functions like DLookup(), DCount(), etc. you need to use very specific syntax. For more information on these functions you can take a look
here. The article is about DLookup() but all the functions use the same syntax.
Not to worry about returning the favor as I will be in Hawaii for a month and I expect that you will put me up, feed me, take me to some of the better bars and generally treat me like a king...or not!!! Relax! I am not coming to Hawaii in the foreseeable future!! Was that a sigh of relief I heard???

Jack
cmasteller
Jan 25 2006, 07:39 PM
Trust me Jack, if you ever make it out to Oahu, please look me up. At the very least, I am sure I could arrange a day sail around Oahu on our ship and spring for a meal or two as well. We spent a lot more than that on this other programmer who started this Cadet DataBase and he didn't do near what you and the rest of UA have done for us.
So if you or any other UA'ers are coming to Oahu, let me know.
And thanks for the link to the article.
Mahalo;
Charles
Jack Cowley
Jan 25 2006, 07:51 PM
Charles -
That is a very kind offer! It put a smile on my face and I can almost feel the salt spray on my face as we tack into the wind... Or do you not tack into the wind??? My Navy experience was limited to airplanes, not ships, and my Army experience was limited to mud, long 'walks' and K-Rations...
I do not know what you do at Marimed, but my hat is off to you for being part of what appears to be an excellent program.... I wish you and the organization continued success!!
Jack
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.