Results 1 to 7 of 7
  1. #1
    wheddingsjr is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jan 2017
    Posts
    26

    Access formula

    Hi all

    I am trying to find a way to use a formula in Access so that I can complete a project where I am trying to determine the number of dates of service within a group. I typically use a simple formula in excel but there are too many lines and it locks up. I can either do a few at a time using excel or drop the spreadsheet in access and do them all at once if thats at all possible. I am including an example so that there is an idea of what I am trying to accomplish. The column in question is the "Date Count" column. The excel formula that I am using in that column is


    '=COUNTIF($A$2:A2,A2)'.

    MEMNO DATE COUNT UNIQ DOS BEGDATE
    097401 1 1 02/19/16
    097401 2 1 05/16/16
    097401 3 1 08/18/16
    100501 1 1 01/25/16
    100501 2 1 10/11/16
    108200 1 1 12/08/16
    108201 1 1 04/29/16
    108201 2 1 04/30/16
    108201 3 1 10/21/16
    124600 1 1 02/11/16
    125900 1 1 12/21/16
    160101 1 1 06/03/16
    160601 1 1 04/08/16
    225000 1 1 03/30/16
    225001 1 1 07/07/16
    319400 1 1 03/22/16
    319400 2 1 10/08/16
    337100 1 1 02/21/16
    337101 1 1 02/28/16
    337101 2 1 08/01/16


    Thanks

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Take a look at the DCOUNT function: https://www.techonthenet.com/access/...ain/dcount.php

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    If you're doing this in access, use an aggregate query

    SELECT BEGDATE, Count(MemNo) as RecordCount FROM tblTABLENAME

  4. #4
    wheddingsjr is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jan 2017
    Posts
    26
    Thanks JoeM

    Unfortunately, that was not very helpful. It wasnt quite what I was looking for.

  5. #5
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Sorry, I misread the question and thought you were looking for a Total Count of each MEMNO value, not a Running Count of each one.
    Paul (pbaldy), who is active on this site, showed someone how to do that on another site in this thread: https://access-programmers.co.uk/for...d.php?p=941585

  6. #6
    wheddingsjr is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jan 2017
    Posts
    26
    Quote Originally Posted by JoeM View Post
    Sorry, I misread the question and thought you were looking for a Total Count of each MEMNO value, not a Running Count of each one.
    Paul (pbaldy), who is active on this site, showed someone how to do that on another site in this thread: https://access-programmers.co.uk/for...d.php?p=941585
    wow...that was perfect. I did have a small issue and responded to Paul but other than that this is EXACTLY what I was looking for...Thanks a mil Joe

  7. #7
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Its kind of funny, I misunderstood the question, but the suggestion of DCOUNT was part of the solution, just not in the way I first envisioned.
    Thanks to Paul's wizardry and use of it!

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

Similar Threads

  1. Access Formula
    By mike182 in forum Database Design
    Replies: 3
    Last Post: 12-03-2016, 12:31 PM
  2. Replies: 19
    Last Post: 07-13-2015, 10:15 AM
  3. Replies: 41
    Last Post: 05-29-2015, 02:58 PM
  4. Access formula
    By Zeebow in forum Programming
    Replies: 3
    Last Post: 10-03-2014, 02:07 PM
  5. Max formula in Access
    By mohsin74 in forum Programming
    Replies: 2
    Last Post: 12-26-2006, 07:21 AM

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