Access 2000 Question:

Shawnm

Member
Aug 26, 2002
31
0
0
I'm new to Access, so try and bear with me :).

I am doing a report in Access 2000, and it would be very helpful if I could take the size(I.E. How many rows of data there are.), for a querry I wrote. How would I go about doing this?

Thanks!
 

Saynac

Member
Apr 12, 2000
68
0
0
I'm not quite following exactly what you want, but the Count(*) field will return a count of all the records included in a query.

For example, say you have a database with 55 entries in it. A simple "Select * from my_Database" will return all of those entries. If you instead use this query -- "Select Count(*) from my_Database" you will get a result of "55".


HTH!
 

Shawnm

Member
Aug 26, 2002
31
0
0
I'm not really understanding, sorry...are you saying that:

If I have a database called "Widgets", and I have a querry called "Red Widgets", that querries the database, and creates a list of all the Widgets that are Red, when I am building a report, in the report I could use

Count(Red Widgets) and it would return how many items are in the result of the Red Widgets querry?
 

Saynac

Member
Apr 12, 2000
68
0
0
Originally posted by: Shawnm
I'm not really understanding, sorry...are you saying that:

If I have a database called "Widgets", and I have a querry called "Red Widgets", that querries the database, and creates a list of all the Widgets that are Red, when I am building a report, in the report I could use

Count(Red Widgets) and it would return how many items are in the result of the Red Widgets querry?

Not quite. I'm talking about the actual SQL statements used in the queries.

Using your example, let's say that your query called "Red Widgets" is actually composed of the SQL statement "Select * from Widgets where Color = 'Red'". Sound good so far? Say that query returns a list of 35 entries, all of which have the Color field equal to 'Red'.

If you want a query that returns how many items are in the result of the above query, just change the SQL statement to this "Select Count(*) from Widgets where Color = 'Red'" and you will get a single return value back of '35'.

If you're not manipulating the SQL directly, I'm assuming you are using the query and report wizards. In this case, you can still do what you need but I'd have to spend a couple minutes looking at the help files to see how they do it. You can do that yourself, I'm sure.

Good luck, Shawn.
 

Shawnm

Member
Aug 26, 2002
31
0
0
Ok I understand now! That did exactly what I was looking for. Thanks very much Saynac! :D