Results 1 to 6 of 6
  1. #1
    killermonkey is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    20

    DCount in a Form

    Ok I've got yet another question in relations to this thread/database:


    https://www.accessforums.net/program...elp-38626.html

    I spend all day yesterday trying to come up with a viable solution but it's escaping me. I want to create a form where a user can enter new information while at the same time see a quick overview of how the month is looking. Basically I want multiple textboxes that count stuff like the number of people that score between a 90 and 100 (Excellent), the number that score between a 75 and 89.9 (Satisfactory) and the number of people that score below a 75 (Failing). Additionally I'd like to see total number of passing scores and failing scores, failures in certain categories ect ect...more or less something like this that was created in excel:

    Click image for larger version. 

Name:	Untitled.png 
Views:	32 
Size:	47.2 KB 
ID:	14131

    The problem I'm having is that dcount blows accesses mind. It cant seem to handle even one dcount without freezing everything.

    What I'm wondering is there an alternative to dcount where I can achieve the same thing without the lagging headache?


    Thanks in advance

    Tyler

  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,770
    Options could be:

    1. listbox with RowSource based on aggregate query

    2. subform with RecordSource based on aggregate query
    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
    killermonkey is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    20
    June,

    Would I have to build a separate aggregate query for every criteria I was trying to find?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I see possibly 5: Overall, AgeByGender, Scores (what about gender), Category, GenderFailures (this one seems extraneous because the info is in the AgeByGender failures). The SQL could probably be built right in the RowSource or RecordSource property.

    Won't be able to do color coding in listbox nor the centered text (not without some fancy code).

    See data discrepancy: 48 failures by gender but 49 failures by category.

    I know domain aggregate functions can be slow but I use them frequently without major issues.
    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.

  5. #5
    killermonkey is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    20
    June,

    I have a couple follow up questions. I got the listboxes to work for overall, gender failures, and score range failures. I having trouble figuring out how to combine the category failures into one listbox since they are separate columns in the query. Also I have the listboxes set up so that they only show data month that is selected off a combobox on the form. What's happening is that when I change the month it requeries the listboxes but sometimes only the first item in the list will display. You have any idea why it would be doing that?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Don't understand 'combine the category failures into one listbox since they are separate columns'. Why would separate columns be an issue? Of course data is in separate columns.

    No idea why the requery shows only single item in listbox.
    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.

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

Similar Threads

  1. DCount
    By Newbie11 in forum Reports
    Replies: 4
    Last Post: 08-03-2012, 12:23 AM
  2. DCount
    By nsteenhaut in forum Queries
    Replies: 2
    Last Post: 10-04-2011, 05:00 PM
  3. DCount and If
    By Madmax in forum Access
    Replies: 3
    Last Post: 07-28-2011, 06:53 AM
  4. DCount Causing Form to Stall
    By Zerdan in forum Forms
    Replies: 2
    Last Post: 06-01-2011, 11:28 AM
  5. Help with Dcount
    By tozey in forum Programming
    Replies: 1
    Last Post: 08-10-2010, 10:53 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