Results 1 to 2 of 2
  1. #1
    Cheshire101 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    42

    Question Count Records

    Ok I need a little help, I am trying to count the numbers of records in a table that match the number of records from another table and counting how many of those each ID has.
    I thought this would work but no go....
    Can anybody help me?



    Code:
    StrSQL = "SELECT COUNT(ID) FROM tblCurrentTraining INNER JOIN tblJobFunctionsReqs ON tblCurrentTraining.TrnNo = tblJobFunctionsReqs.ReqNo GROUP BY tblJobFunctionsReqs.JobFunction, tblCurrentTraining.ID HAVING (((tblJobFunctionsReqs.JobFunction)='AOI Operator'));"
    I want to use a SQL style statement if at possible

  2. #2
    Cheshire101 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    42
    Fixed my own problem...if you use this after the StrSQl statement.
    varComp = CurrentDb.OpenRecordset(StrSQL).Fields(2)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Is it possible for me to count my records? how?
    By radicrains in forum Queries
    Replies: 4
    Last Post: 10-28-2010, 05:28 AM
  2. Count IIf based on records above and below
    By William McKinley in forum Queries
    Replies: 19
    Last Post: 09-17-2010, 04:49 PM
  3. Count of records
    By Aston in forum Access
    Replies: 2
    Last Post: 03-30-2010, 05:20 AM
  4. Count of records
    By Bruce in forum Forms
    Replies: 3
    Last Post: 03-22-2010, 01:30 PM
  5. Count records issue
    By EstesExpress in forum Forms
    Replies: 1
    Last Post: 09-29-2009, 12:24 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums