Results 1 to 3 of 3
  1. #1
    ndehhh is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Posts
    7

    Select Count Problem

    I have this form which allows students to register for courses. However, each student can only register for 6 courses.



    The studentID of each student appears each time the student registers for a course.
    (I.e A student registers for 5 courses, then the student has 5 rows of studentID and Course)


    How do I count the number of times the studentID input into the form appears in the table?

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    depends on where you are counting from (form/query/vba)

    in a query you might use SELECT count(*) FROM myTable WHERE StudentID=1

    or you can use the dcount function - DCount("*","myTable","StudentID=1")

  3. #3
    InsuranceGuy is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Location
    Colorado
    Posts
    126
    I suspect you're indicating that you only want the count of distinct StudentID values.

    https://www.google.com/search?espv=2...t+count+access

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

Similar Threads

  1. Adding a Count function to current select statement
    By johnson8809 in forum Queries
    Replies: 2
    Last Post: 02-21-2015, 07:32 PM
  2. Replies: 7
    Last Post: 12-15-2013, 08:42 PM
  3. Replies: 3
    Last Post: 08-03-2012, 02:37 AM
  4. Select, Count, Where (Like) HELP!
    By nols76 in forum Queries
    Replies: 3
    Last Post: 08-24-2011, 11:36 AM
  5. count and switch function in same select query
    By sandlucky in forum Queries
    Replies: 2
    Last Post: 04-08-2011, 11:16 PM

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