Results 1 to 3 of 3
  1. #1
    zburns is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    39

    Loop thru Report Records


    Presently I have an autoexec macro that opens severalreports (from different tables) in which I can view specific records nearingtheir expiration by conditional formatting of a particular date field.
    What I would like to do is be able to loop thru each selectedreport and display just those records meeting the expiration criteria. Then display on a separate report just thoserecords (from each report) that meet the criteria.
    So instead of multiple reports to lookthrough I would only have one report that only shows those specific records.

    I assume this can be accomplished but need some help to get startedwith the process.

    Thanks in advance

  2. #2
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    If you're using only macros, apply a filter or WHERE clause in the Open Report parameters to open each report version as you wish it to be. After you close the report in the macro, you can re-open it with a different filter or WHERE clause. If you need help on this, press F1 when you are on the macro parameters at the bottom of the macro window for the particular step.
    Or will this not work because you want to view them and not print them? You can only have one version of a report open at any time. If you need multiple versions, I think you'll have to create them. Even with code, you can only view 1 version at a time AFAIK.
    Last edited by Micron; 02-05-2016 at 10:59 AM. Reason: versions
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    In database development, which differs from programming - one should not think in terms of 'looping thru' but rather in terms of record sets. It makes a huge different in the speed of the application when the tables are large. You would want to create a query that has the same criteria as your conditional format logic. This creates a new record set - and then you create a new report using this record set.

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

Similar Threads

  1. Replies: 17
    Last Post: 04-07-2014, 07:48 PM
  2. VBA Loop to Combine Records
    By admessing in forum Queries
    Replies: 23
    Last Post: 03-06-2012, 11:37 AM
  3. Loop through records
    By sam10 in forum Programming
    Replies: 12
    Last Post: 07-07-2011, 02:30 PM
  4. Loop through subform records
    By asmith in forum Forms
    Replies: 6
    Last Post: 10-06-2010, 10:31 AM
  5. Loop through Records and Make ID
    By rob4465 in forum Programming
    Replies: 3
    Last Post: 01-14-2010, 10:46 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