Results 1 to 6 of 6
  1. #1
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727

    show first few

    All using 2010. Have a report. I want to show the first few records but the total for all the records. Based on query; I ask for top 10. I tried "can't grow" in the properties. It gives me the first 10 records but only the total for the ten. How can i retrieve results I need. Thanks in advance

  2. #2
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Ok. No takers. Maybe I can write code to hide records greater than 10???
    But How.
    Code:
    If me.control.value >10 then
    me.control.visible =false
    would hide all correct?

  3. #3
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    First impression : Use two different subreports, one for the first ten and one (without detail) summarizing the whole set.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Another possibility is domain aggregate function (DSum).

    Or report/subreport as Dal suggested. Main report RecordSource could be an aggregate query. Subreport RecordSource would be the limited dataset.


    I deleted the dup thread.
    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
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    how would the dsum work?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The total for all records in table would be: DSum("fieldname","tablename").

    Can apply filter criteria in the WHERE CONDITION arugument: DSum("fieldname", "tablename", "some field=" & some value)

    Access Help has more info on domain aggregate functions.
    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. Please show me how to
    By cadmaster in forum Access
    Replies: 1
    Last Post: 06-17-2013, 02:36 AM
  2. Show a sum value in a query
    By marcvanderpeet12 in forum Queries
    Replies: 1
    Last Post: 06-12-2013, 03:36 AM
  3. Replies: 1
    Last Post: 06-12-2011, 07:08 AM
  4. Need to show Oct - Dec as 1st Qtr
    By Brian62 in forum Queries
    Replies: 3
    Last Post: 03-30-2011, 11:59 AM
  5. Show some or all
    By protean_being in forum Queries
    Replies: 1
    Last Post: 05-28-2008, 05:33 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