Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2005

Tip: Looking for answers? Try searching our database.

Dcount function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Curt - 05 Mar 2005 04:51 GMT
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
DebbieG - 05 Mar 2005 05:51 GMT
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

| Help! I'm not sure where to post this, so here goes. Is
| it possible to use 'AND' in the criteria portion of a
[quoted text clipped - 13 lines]
|
| Curt
Erice - 09 Mar 2005 23:07 GMT
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

> DCount("[BusID]","tblBusiness","[Rate] = 2 AND [Department] = ""Sales""")
> or Access VBA Help shows the example like this:
[quoted text clipped - 20 lines]
> |
> | Curt
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.