Re: Finding Number of RecordsAffected in a Select Query

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: John Nurick (j.mapSoN.nurick_at_dial.pipex.com)
Date: 04/23/04


Date: Fri, 23 Apr 2004 21:22:53 +0100

Hi Mike,

For the number of records that will be selected by a select query, you
can use

        DCount("*", "QueryName")

Substitute the name of the table for a count of the number of records in
the table.

On 23 Apr 2004 18:03:29 GMT, oceansidedj@aol.com (OceansideDJ) wrote:

>I am using db.execute... then db.recordsaffected, but Access is telling me it
>does not work in a Select query. How can I find the number of records
>selected in a select query? In a table?
>
>I want to show to the user "n of m records updated."
>
>Thanks,
>
>Mike

--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.


Relevant Pages

  • Re: Wizard for Easily Creating Forms and Subforms
    ... If you do it the way I suggested there are no "parent-child" issues: ... bound to one query. ... >> Please respond in the newgroup and not by email. ... John Nurick [Microsoft Access MVP] ...
    (microsoft.public.access.formscoding)
  • Re: Word merge problem still
    ... >The only problem is that I need to remember the query criteria. ... >> merged document to contain, ... >> Please respond in the newgroup and not by email. ... John Nurick [Microsoft Access MVP] ...
    (microsoft.public.access.externaldata)
  • Re: Having problems with import
    ... In a query you'd use something like ... WHERE (TheField Is Not Null) ... >>Please respond in the newgroup and not by email. ... John Nurick [Microsoft Access MVP] ...
    (microsoft.public.access.externaldata)
  • Re: Macro that querys only the most current dBase file.
    ... One way is the substitute the file reference in the select ... Dim fname as String ... > I am using Excell 2000 to query an external dBase file. ... > I sucessfully recorded a Macro that follows my MS Query ...
    (microsoft.public.excel.programming)
  • Re: Re import data
    ... Just use a Delete query to delete the old records before you import the ... John Nurick [Microsoft Access MVP] ... Please respond in the newgroup and not by email. ...
    (microsoft.public.access.externaldata)