Results 1 to 2 of 2

Thread: Counting

  1. #1
    Join Date
    Dec 1969

    Default Counting

    I am trying to count the number of times a value appears in a database table with a date as a criteria.<BR><BR>Is it best to use code to do this or get the results in a database query first.<BR><BR>If the code route is the best coan some one please show me line of code.<BR><BR>thanks

  2. #2
    Join Date
    Dec 1969

    Default You should be able to get this

    back directly from a database query. IE:<BR><BR>SELECT count(*) as thecount FROM table WHERE theDateField BETWEEN &#039;" & firstDate & "&#039; AND &#039;" & lastDate & "&#039;"<BR><BR>The syntax above is for sql server, for how to query dates in access read this:<BR><BR><BR>For info on count:<BR>

Posting Permissions

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