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
>
>
|