Results 1 to 7 of 7
  1. #1
    Lance H is offline Novice
    Windows 11 Office 365
    Join Date
    Feb 2025
    Location
    Delaneys Creek, Queensland, Australia
    Posts
    5

    Adding four total fields to the switchboard ....


    Wondering if I can possibly get some help, please. I run a basic membership database for my car club which has about 680 members listed. On the switchboard, I would like to add four fields showing the number of life members, full (ordinary) members and associate members. The fourth being a total of the three. I request advice on how to show the totals. Just for general interest, the club's URL is: www.crcc.com.au
    Attached Thumbnails Attached Thumbnails Screenshot 2025-02-24 091233.jpg   Screenshot 2025-02-24 091400.jpg  

  2. #2
    madpiet is offline Expert
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    566
    use DCOUNT and filter by type.

  3. #3
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    437
    as advised you can use DCount():
    on design view of your form:

    1. click on "Life" textbox.
    on it's Property->Data->Control source, put
    =DCount("1","tbl_company","Class = 'Life'")

    2. on the other box, do the same, only
    change 'Life' with appropriate Class ('Ordinary' or 'Associate')

    3. for the total textbox:
    =DCount("1","tbl_company","Class = 'Life' Or Class = 'Ordinary' Or Class ='Associate'")

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    I would not do a DCount for the total , just add the three controls already populated?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,425
    @Lance H; next time consider combo boxes for single choices pertaining to one category. While you'll likely never add to choices like 'month' you might add reports and your way will require you to redesign the form. Much easier to have a table of reports and populate a combo and pick one. The only thing needing to be modified would be the code to cover the added report option.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Lance H is offline Novice
    Windows 11 Office 365
    Join Date
    Feb 2025
    Location
    Delaneys Creek, Queensland, Australia
    Posts
    5

    Adding four total fields to the switchboard ....

    Quote Originally Posted by jojowhite View Post
    as advised you can use DCount():
    on design view of your form:

    1. click on "Life" textbox.
    on it's Property->Data->Control source, put
    =DCount("1","tbl_company","Class = 'Life'")

    2. on the other box, do the same, only
    change 'Life' with appropriate Class ('Ordinary' or 'Associate')

    3. for the total textbox:
    =DCount("1","tbl_company","Class = 'Life' Or Class = 'Ordinary' Or Class ='Associate'")

    Thank you for your advice. It worked beautifully and is exactly as I wanted.

  7. #7
    Lance H is offline Novice
    Windows 11 Office 365
    Join Date
    Feb 2025
    Location
    Delaneys Creek, Queensland, Australia
    Posts
    5
    Thank you for responding and for your recommendation.

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

Similar Threads

  1. Replies: 6
    Last Post: 08-13-2018, 11:12 AM
  2. Replies: 6
    Last Post: 07-30-2015, 05:36 PM
  3. Replies: 1
    Last Post: 09-27-2013, 03:53 PM
  4. Replies: 7
    Last Post: 09-13-2011, 01:38 PM
  5. Calculating the sum of every four records.
    By Alanlives in forum Queries
    Replies: 0
    Last Post: 07-31-2009, 05:56 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