Results 1 to 5 of 5
  1. #1
    TrackStar is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    11

    Grouping in a report

    I have a database that pulls a random group of 5 results everytime. Is it possible to pull the top 100 and split that into groups of 5?


    If that is not possible can I pull different random groups of 5 from the same database into a report? The formating for designing an Access report has not let me yet.

    The purpose of doing one of these things is to cut out duplicates and printing 1 document.



    Thank you for your time.


    Mike

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    That doesn't really explain why need groups of 5. You can pull the top 100 and output on report. The 100 records would also be random?
    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
    TrackStar is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    11
    The formating is the most important part of the report. I am trying to fit three groups of five ranadom results on each page and I need ten pages. I would cut these pages into thirds creating 30 7" by 3.5" pieces of paper.

    These small pieces of paper would be written on to check daily inventory counts.

    I want to use one database so there would be no repeats of the random data, but I cannot seem to format access reports to do so.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    I still don't understand the 'random' aspect to your issue. Why would an inventory effort use randomly selected records? Don't you have to count everything in stock? Also, 3 groups x 5 results x 10 pages = 150 records.

    You want a page break after every 15th record? Review:
    http://support.microsoft.com/kb/209006
    Another syntax for the Format event code:
    Me.PageBreak.Visible = Me.tbxCount Mod 15 = 0
    The Format event executes only during PrintPreview or direct to printer.

    The real challenge is 'grouping' every 5 records so can create white space between the groups. Review:
    http://allenbrowne.com/ser-12.html
    This technique will leave white space the same height as a single record in the Detail section. Any method to create more white space will probably involve more complex VBA code and I have no idea what that code would be.
    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
    epb is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Location
    Near Chicago
    Posts
    36
    Hello June 7,

    I know this is after the fact but an explanation on inventory... In many cases an inventory can be performed through cycle counting. X number of random locations or products checked every X number of weeks or months. Then, Over time, the randomness allows for a good cross section of inventory to be examined. This is sometimes preferred to a complete inventory on say a yearly basis.

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

Similar Threads

  1. Grouping in a report
    By YStein142 in forum Reports
    Replies: 3
    Last Post: 06-28-2012, 05:22 PM
  2. Grouping on Report
    By Amber in forum Reports
    Replies: 3
    Last Post: 02-01-2012, 05:48 PM
  3. Grouping by Month in Report
    By ccordner in forum Reports
    Replies: 2
    Last Post: 12-20-2011, 09:05 AM
  4. Report grouping
    By tarhim47 in forum Reports
    Replies: 1
    Last Post: 06-08-2011, 04:31 PM
  5. Grouping a report
    By JAJansenJr in forum Reports
    Replies: 0
    Last Post: 03-01-2011, 11:05 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