Results 1 to 7 of 7
  1. #1
    leighanndukes1428 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2019
    Posts
    3

    how to total combo box items in a report


    Very new to access. Self taught actually. I have my database set up to keep up with a large dinner. I have guest1 and guest2 options and for each guest I have 3 options for dinner. How can I get my report to calculate how many steak, chicken and veggie meals I will need for the dinner? It is set up as a Combo Box. Please remember that I am very new and self taught.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    It sounds like you've made a design mistake. You have the guests as fields? What if you have 3 guests (ie more than you have fields for)? The normalized design would be a related table where each guest is a record. Then you simply count the selections made with a totals query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    leighanndukes1428 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2019
    Posts
    3
    I will not have more than 2 guests. It is for couples, so 2 at the most. Is there a way to make the combo box total each option. Combo box contains 3 options.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Since you are new to Access and database concepts, I recommend you spend 45-60 minutes working through 1 or 2 tutorials from RogersAccessLibrary. The specific links are contained in the Database Planning and Design article in my signature.

    The tutorials will lead you through a process to identify the things of interest to your "business" following design principles and create a blueprint for your database. You will be able to test that blueprint before getting too involved and distracted with Access details. Good databases start with good requirements, models and testing/vetting.
    Good luck with your project.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by leighanndukes1428 View Post
    I will not have more than 2 guests. It is for couples, so 2 at the most. Is there a way to make the combo box total each option. Combo box contains 3 options.
    If you only have 2 guests, what's to total up? Can you attach the db or at least the table structure, with perhaps some sample data?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    leighanndukes1428 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2019
    Posts
    3
    I can't attach due to PII. Each guest chooses a menu option. There are 3 choices for each guest. I set that up in a combo box with the 3 choices. I just need an easy way to total each choice in the combo box. I know this so probably petty, and I'm probably not explaining it most proficiently, but I was really hoping to be able to create report that would total up each meal choice for each guest.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The fact that you're trying to total up choices implies there are multiple records on the report, which is not your "2 guests". Sounds like it's 2 guests per record. You said you were new and 2 experienced developers have mentioned the design issue. If you don't want to change it that's your choice, but you'll likely be working around it again.

    It would be easier to show you if you could attach a db, even with a few fake records. Basically the workaround for data that isn't normalized is to combine the guest1 and guest2 fields in a UNION query to normalize it, then base a totals query on that. If it sounds complicated it kinda is, because of the design.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 08-12-2017, 03:09 AM
  2. Replies: 4
    Last Post: 03-07-2017, 08:59 AM
  3. Replies: 7
    Last Post: 12-13-2016, 08:45 AM
  4. Replies: 11
    Last Post: 07-10-2014, 03:21 PM
  5. Replies: 1
    Last Post: 10-28-2009, 12:44 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