count in query

yoavchen

Registered User.
Local time
Today, 05:12
Joined
Jan 31, 2005
Messages
53
how can i count the number of rows in a query.
i have a query that return me number of rows. i want to count the rows.
when i try to count it, it gave me a column that count only her column. which mean in every row it counts me '1'.
i want to count all the rows.
 
Hello yoavchen!
Look at "DemoQryCountRowsA2000.mdb".
Look at "Table1", "Query2" (field Countw),
"Form1", "Module1".
Open Form1 and click on command button.
I think it is what you need.
 

Attachments

almost....
you made me a counter. i need to count the rows - "4" in this case.
i need this number for some if i am trying to execute

i am trying to do if:

if NumofRows<5 then
txt1.visible=false
end if
 
almost....
you made me a counter. i need to count the rows - "4" in this case.
i need this number for some if i am trying to execute

i am trying to do if:

if NumofRows<5 then
txt1.visible=false
end if

just wondering if you ever managed to sort this? this is the same thing as i am trying to do!!!

emily
 
To use a count in code like that I would use DCount() not a query.
 

Users who are viewing this thread

Back
Top Bottom