capture a count query result in code

P

Phil

Dear helper,

I am using Access 97 and have a query to count the no. of
record selected. How can I capture the result of the
query in visual basic. I would like to show a message to
the users how many records are selected. Is it possible?

Thank you so much.
 
K

Ken Snell

You can use the DCount function to get the number of records in a table or
query:

DCount("*", "TableOrQueryName", "[FieldName] = 'SomeValue'")
 
Top