capture a count query result in code

  • Thread starter Thread starter Phil
  • Start date Start date
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.
 
You can use the DCount function to get the number of records in a table or
query:

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