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'")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top