count and max not returning correct values

Results 1 to 4 of 4

Thread: count and max not returning correct values

  1. #1
    Cal Guest

    Default count and max not returning correct values

    Hi, I have problem with counting records. I just want to display the total number of records.<BR><BR>I was using count(*) for while, but then I noticed it was displaying the same number (the number I was seeing at the bottom of MS Access, total records).<BR><BR>In fact, sometimes count(*) with a WHERE condition, would actually display TOTAL record count (like 200) when I knew it was much smaller (20 or so).<BR><BR>I&#039;ve used max() as well, but I get the same kind of problems!<BR><BR>A number is always off by a few... or by a whole lot.<BR><BR>So what is going on here?

  2. #2
    Join Date
    Dec 1969

    Default Show *real* code???

    It works fine for me. Show your SQL.<BR><BR>

  3. #3
    Cal Guest

    Default RE: Show *real* code???

    cs.Open "SELECT Count(Id) FROM Sites", conn<BR><BR>Outputs 38<BR><BR>cs.Open "SELECT count(Id) FROM Games WHERE Exclusive NOT LIKE &#039;-&#039;", conn<BR><BR>Outputs 40<BR><BR>For example.<BR><BR>Then if I were to try max(), I would get 260 or something (when there is 278 total actually).

  4. #4
    Cal Guest

    Default *whoops wrong code, but...:*

    Sorry that was the wrong code I pasted...<BR><BR>I solved my problem anyways (there was an unrelated problem in this incident)...<BR><BR>... but I DO distinctly remember getting the count problem I described. I&#039;ll re-post when I encounter it again.<BR><BR>Sorry for wasting time.

Posting Permissions

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