Dcount

  • Thread starter amnist via AccessMonster.com
  • Start date
A

amnist via AccessMonster.com

Hey guys am trying to use Dcount to count the number of data i have in an
archive table. I want to only return the newer archive data count not the
entire database count. This is the Dcount code am using currently.

=DCount("*",[Forms]![frm_HC_Prior]![cbo_Prior_Period].[Value],"
[Dept_Description] = '" & [Forms]![frm_HC_Prior]![cbo_dept_Description].
[Value] & "'")

Am using combo box to sort the data for me, all i need now is to only return
newer data.

Can some one help please
 
F

fredg

Hey guys am trying to use Dcount to count the number of data i have in an
archive table. I want to only return the newer archive data count not the
entire database count. This is the Dcount code am using currently.

=DCount("*",[Forms]![frm_HC_Prior]![cbo_Prior_Period].[Value],"
[Dept_Description] = '" & [Forms]![frm_HC_Prior]![cbo_dept_Description].
[Value] & "'")

Am using combo box to sort the data for me, all i need now is to only return
newer data.

Can some one help please

DCount only counts items in a TABLE or QUERY, not data on a form.
The data on the form can be used as criteria.

What determines if it is a newer or older archive record?
[Part_Description]?

If this code is written on the form "frm_HC_Prior":

=DCount("*","NameOfTableOrQueryHere","[Dept_Description] = '" &
Me![cbo_dept_Description] & "'")

The above also assumes Dept_Description is Text datatype.
 
A

amnist via AccessMonster.com

The table is filter by the combo boxes. I want to show base on the criterias
selected from the combo boxes.
Hey guys am trying to use Dcount to count the number of data i have in an
archive table. I want to only return the newer archive data count not the
[quoted text clipped - 8 lines]
Can some one help please

DCount only counts items in a TABLE or QUERY, not data on a form.
The data on the form can be used as criteria.

What determines if it is a newer or older archive record?
[Part_Description]?

If this code is written on the form "frm_HC_Prior":

=DCount("*","NameOfTableOrQueryHere","[Dept_Description] = '" &
Me![cbo_dept_Description] & "'")

The above also assumes Dept_Description is Text datatype.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top