PC Review


Reply
Thread Tools Rate Thread

Dcount function

 
 
Curt
Guest
Posts: n/a
 
      5th Mar 2005
Help! I'm not sure where to post this, so here goes. Is
it possible to use 'AND' in the criteria portion of a
dcount() function. Specifically, I want to count the
number of records that have a particular value in Field
A, and a particular string in Field B.
As an example:
Dcount("BusID","tblBusiness","[Rate]=2 AND [Department]=
Sales).

The idea here is to count only the number of records
where the Rate is 2, and the Department is "Sales".

Is there any hope?

Thanks for any help,

Curt
 
Reply With Quote
 
 
 
 
DebbieG
Guest
Posts: n/a
 
      5th Mar 2005
DCount("[BusID]","tblBusiness","[Rate] = 2 AND [Department] = ""Sales""")
or Access VBA Help shows the example like this:
DCount("[BusID]","tblBusiness","[Rate] = 2 AND [Department] = 'Sales'")

HTH,
Debbie


"Curt" <(E-Mail Removed)> wrote in message
news:49e601c5213f$0a41ae20$(E-Mail Removed)...
| Help! I'm not sure where to post this, so here goes. Is
| it possible to use 'AND' in the criteria portion of a
| dcount() function. Specifically, I want to count the
| number of records that have a particular value in Field
| A, and a particular string in Field B.
| As an example:
| Dcount("BusID","tblBusiness","[Rate]=2 AND [Department]=
| Sales).
|
| The idea here is to count only the number of records
| where the Rate is 2, and the Department is "Sales".
|
| Is there any hope?
|
| Thanks for any help,
|
| Curt

 
Reply With Quote
 
=?Utf-8?B?RXJpY2U=?=
Guest
Posts: n/a
 
      9th Mar 2005
I was able to get the mulitple criteria model to work, but what syntax in
invovled in getting a variable to affect the criteria?

Ex: LocCount = DCount("LocationCode", "Location", "'lnkCrit'")
lnkcrit = "[Location!projectID] = " & strProjID & ""

I'm trying to return the number of records on Location that match to a
particular project ID for a For... next loop.

Sincerely,
Eric

"DebbieG" wrote:

> DCount("[BusID]","tblBusiness","[Rate] = 2 AND [Department] = ""Sales""")
> or Access VBA Help shows the example like this:
> DCount("[BusID]","tblBusiness","[Rate] = 2 AND [Department] = 'Sales'")
>
> HTH,
> Debbie
>
>
> "Curt" <(E-Mail Removed)> wrote in message
> news:49e601c5213f$0a41ae20$(E-Mail Removed)...
> | Help! I'm not sure where to post this, so here goes. Is
> | it possible to use 'AND' in the criteria portion of a
> | dcount() function. Specifically, I want to count the
> | number of records that have a particular value in Field
> | A, and a particular string in Field B.
> | As an example:
> | Dcount("BusID","tblBusiness","[Rate]=2 AND [Department]=
> | Sales).
> |
> | The idea here is to count only the number of records
> | where the Rate is 2, and the Department is "Sales".
> |
> | Is there any hope?
> |
> | Thanks for any help,
> |
> | Curt
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DCount and IIf function Kaylen Microsoft Access 10 28th Mar 2008 02:23 AM
Using dcount function within user-defined worksheet function =?Utf-8?B?cG9uZ3RoYWk=?= Microsoft Excel Programming 3 15th Jan 2007 09:55 AM
How to use DCount function ? awu Microsoft Access Form Coding 0 3rd Oct 2005 10:06 PM
DCount function SheldonMopes@KidNet.com Microsoft Access Queries 1 29th May 2005 01:47 AM
DCOUNT function Janel Microsoft Excel Worksheet Functions 0 12th Sep 2003 08:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:14 AM.