Results 1 to 2 of 2

Thread: how to count

  1. #1
    Join Date
    Aug 2003
    Location
    London,UK
    Posts
    54

    Unanswered: how to count

    I have a database with roughly 5000 records in one table (property details). Each property has a unique number against them. However this number may be in to forms nnnnnnn or nnnttnn (all numbers or numbers and text). i need to find a way to count only those with all numbers in them? any help using vba

  2. #2
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Cool count

    SELECT Count(Table1.Tbl1) AS CoutoffNumeric
    FROM Table1
    WHERE (((IsNumeric([Table1].[Tbl1]))<>False));


    or


    rs.movelast
    rs.movefirst
    x=0
    do until rs("YourField").eof

    if IsNumeric([Table1].[Tbl1])<>False then
    x=x+1
    rs.movenext
    else
    rs.movenext
    end if

    loop
    stop

    'x = now the count of only number records

Posting Permissions

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