Results 1 to 3 of 3
  1. #1
    zekeftw is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2014
    Posts
    2

    Count Number of occurances

    Sorry in advance. Im sure this has been asked and answered already. I tried searching for an answer but I dont think i know the right terminology. I'm new to Access.



    I have a table where 1 column has company names and the other has fax numbers

    COMPANY 1 19998887777
    COMPANY 2 16665554444
    COMPANY 3 13332221111
    COMPANY 1 18885552222
    COMPANY 4 19996663333
    COMPANY 1 19998887777
    COMPANY 5 12225558888
    COMPANY 1 19998887777
    COMPANY 5 12225558888
    COMPANY 1 18885552222

    I'm need to run a query to count the occurances of COMPANY 1 for each fax number
    19998887777
    3
    18885552222 2
    I'm running Acess 2003 and had no luck using "Create query in Design View" or with the wizard.

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,649
    Build an aggregate query with the query builder. Access Help has more info on using the query builder. This is really basic Access functionality.

    SELECT [Fax], Count(Company) AS CountCompany FROM tablename GROUP BY [Fax];

    Or build a report and use its Sorting & Grouping features with aggregate calcs in header/footer sections. This will allow display of detail records and summary data.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    zekeftw is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2014
    Posts
    2
    Thanks June7 that worked great.

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

Similar Threads

  1. Replies: 8
    Last Post: 05-19-2014, 01:07 PM
  2. Counting number of occurances by date
    By michaelwh1 in forum Access
    Replies: 2
    Last Post: 09-20-2013, 01:35 PM
  3. Count number of days
    By ramindya in forum Queries
    Replies: 1
    Last Post: 02-22-2012, 04:47 PM
  4. Replies: 6
    Last Post: 07-25-2011, 01:54 PM
  5. Only include unique occurances
    By filla_dilla in forum Queries
    Replies: 8
    Last Post: 07-18-2011, 10:22 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