Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003

    Unanswered: Counting Records

    On a form I have two text boxes one to display the total and one to display a total meeting a certain criteria. I can display the total number records in textbox1 but having trouble doing the second one

    control source =count(*)

    I want to do this
    =count(WHERE PRIORITY = "02")

    Unfortuantly I dont know the syntax for this can any one help me.


  2. #2
    Join Date
    Sep 2003
    Make it a query ... Set your controlsource to be something like: SELECT COUNT(*) FROM WhateverTableName WHERE (PRIORITY = '02')
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Dec 2003


    Thanks owen

    Still not there getting #Name? in the text box lets explain some more

    New Form

    In the header two text boxes where I enter start and stop dates, click a button where it then does me.requery

    The main forms record source is based on the criteria entered above

    I then have several texts boxes the first one displays the total the others are based on certain thing like priority = 1,2,3,4 or 5

    I think, i might look at the record source bit now as I dont need to select records only display stats.

  4. #4
    Join Date
    Dec 2003
    Sorted used seperate queries for each condition then used the dcount feature to count the records in that query.

    also scrapped record source for the form as I no longer need it.

Posting Permissions

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