?
Solved

Dcount is counting everything

Posted on 2006-05-25
3
Medium Priority
?
392 Views
Last Modified: 2012-05-05
I have the following dlookup in an unbound report text box:

=DCount("[PinchPk]","tblPinch","'[PSDPk]=[PSDPk]'")

I need to count all the records that is related to the record in the report. Currently it is counting all the records in the table "tblPinch".

Any ideas???

perennial

0
Comment
Question by:perennial
3 Comments
 
LVL 44

Accepted Solution

by:
Leigh Purvis earned 1000 total points
ID: 16761729
I'm guessing you really want something like

=DCount("[PinchPk]","tblPinch","[PSDPk]='" & Me.[PSDPk] & "'")
0
 
LVL 27

Expert Comment

by:jjafferr
ID: 16761766


or if PSDPk is a numeric field, then

=DCount("[PinchPk]","tblPinch","[PSDPk]=" & Me.[PSDPk])
0
 
LVL 1

Author Comment

by:perennial
ID: 16761928
LPurvis,

Thanks, I got to get my quotation straight.

perennial
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question