Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243

    Unanswered: Printing number of records in a table

    I'm debugging my VB-code and now I want to Debug.Print the number of records in a table.
    I used something like this :

    Debug.Print Docmd.RunSQL; "SELECT COUNT(*) FROM table"

    but it doesn't work.

    How can I get to this?

  2. #2
    Join Date
    Mar 2003
    Posts
    4

    Re: Printing number of records in a table

    Use the DCount function instead:

    debug.print dcount(Expression, Domain, Criteria)

    Example:
    debug.print dcount("FieldName","TableName")

    The criteria is optional.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •