How to obtain number of rows in data subset?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using Access 2002. I have a form that produces certain records from a
saved Query data source. I need to obtain the total number of records
produced on the form (already done) as well as the total number of records
for a subset of that data obtained by criteria external to the form's data
source (I currently have another saved Query producing this result). I can't
seem to figure out how to pass the second saved Query's data to the form for
the limited purpose of showing row numbers produced. Does anyone know how to
help?
 
I'm using Access 2002. I have a form that produces certain records from a
saved Query data source. I need to obtain the total number of records
produced on the form (already done) as well as the total number of records
for a subset of that data obtained by criteria external to the form's data
source (I currently have another saved Query producing this result). I can't
seem to figure out how to pass the second saved Query's data to the form for
the limited purpose of showing row numbers produced. Does anyone know how to
help?

How about:

=DCount("*", "queryname", "criteria-string")

John W. Vinson[MVP]
 
Thanks, John, but I've tried that. The problem is that the form's data
source is Query1 and the total number of records I need to find is from
Query2. When I try to use DCount or Count in the field where I want to
display the number required, I either get error or name error. I've tried to
create a second dataset based on Query2 as well, but can't seem to get that
right either. Any other ideas?
 
Back
Top