Results 1 to 5 of 5
  1. #1
    will woodhouse is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2017
    Posts
    2

    Multiple records showing on my report when i only want one.


    I am a real novice to access. I have generated a run of the mill table and a form based on the table. Then I have generated a report based on the table. When I run the report all of the records in the table are showing. How can I get the report to only show the record I am viewing on the form?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The OpenReport command has a WHERE condition argument just like the OpenForm command.
    http://www.baldyweb.com/wherecondition.htm

  3. #3
    will woodhouse is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2017
    Posts
    2
    Sorry Rural Guy. I'm not familiar with vba coding yet. Any other suggestions?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Allan gave you the code, this is where you'd put it:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Only other options would use macro and/or dynamic parameterized query.

    If you use a button on a form to open report, then code can be macro or VBA to structure the WHERE CONDITION argument that references an input control on form.

    If you want to avoid macros and VBA altogether, then use a dynamic parameterized query - very basic Access functionality - as the report RecordSource and open report directly from Navigation Pane.

    The dynamic parameter can be an input popup or can reference input control on form.

    I never use macros nor dynamic parameterized query. If this is intended to be a multi-user db, suggest you learn to code with macros or VBA. VBA offers more versatility and advanced techniques but macros may be adequate for your needs. Keep in mind the more 'user-friendly' the more code.
    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. Report or query not showing all records
    By weslake77 in forum Reports
    Replies: 3
    Last Post: 05-04-2012, 01:33 AM
  2. Replies: 18
    Last Post: 01-27-2012, 12:53 PM
  3. Replies: 1
    Last Post: 01-17-2012, 02:54 PM
  4. Report not showing all records
    By tyguy in forum Reports
    Replies: 6
    Last Post: 05-06-2011, 09:04 AM
  5. Replies: 7
    Last Post: 12-07-2009, 07:27 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