Results 1 to 4 of 4
  1. #1
    andresdm is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2013
    Posts
    6

    Report Using Input on Form

    Hello,



    I have a form where I want Access take the open record ID (called ClaimsLog.CL_Claims_ID) and use it as a filter in a report to only show comments around the CL_Claims_ID.

    Example, for Claim ID 37, I want a macro that will spit out a report with comments only for that Claim. How do I do this?

    Click image for larger version. 

Name:	Comments Table.png 
Views:	10 
Size:	12.5 KB 
ID:	11699

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    I don't use macros, only VBA.

    DoCmd.OpenReport "report name", , , "CM_Claims_ID=" & Me.CM_Claims_ID
    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
    andresdm is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2013
    Posts
    6
    The VBA kinda works. I shows the comments of the open record, however, it keeps printing it and not displaying the report. Do you know why?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    Print output is default for OpenReport. You must specify otherwise by argument parameter.

    Read up in VBA Help on using OpenForm and OpenReport methods to get familiar with their various arguments and optional parameters.
    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. Replies: 3
    Last Post: 03-11-2013, 05:11 PM
  2. How to modify report based on input form
    By pmatush in forum Reports
    Replies: 1
    Last Post: 02-22-2013, 09:47 PM
  3. Replies: 3
    Last Post: 06-25-2012, 06:54 PM
  4. Input parameter in report header
    By geremore in forum Programming
    Replies: 3
    Last Post: 08-08-2011, 01:41 PM
  5. DISPLAY INPUT PARAMETERS ON THE REPORT
    By fadone in forum Forms
    Replies: 1
    Last Post: 12-09-2005, 10:26 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