record count before query

rschultz

Registered User.
Local time
Today, 23:16
Joined
Apr 25, 2001
Messages
96
I need to get a count of all the records where the BillName <> 'Landfill' but I only want to display the records where the weights are over 14020 pounds. I'm not sure how to do that.

I ran a query that gets all the records that have both requirements but then all the records show. Do I have to run a query first to get the count of all the records? and if so how do I get the count of that? and then do I run a second query that gets the actual records I need to display? I guess the main thing I need is to get a count of all the records.
 
>>in the Report Footer, you can place a subreport that is based on a query that produces the count that you need.<<

how do I do that?

I have:StrSource= "SELECT * FROM Crinc WHERE... etc. in a CASE statement

Then I have:
Docmd.OpenReport "OverLoad", acPreview, strSource on a button that the user clicks after they enter the beginning and ending dates for the report in the date textboxes

So I can put a second select statement in that section of the CASE statement and assign it to another variable (right?) but how do I open a second report and place it in the footer of the first one? It seems that's what you're suggesting.
 
Pat:I got it working. I spent the last few hours learning how to add a subreport to a main report. I could probably make it prettier with more work but it's giving me what I need.

Thanks
 

Users who are viewing this thread

Back
Top Bottom