Results 1 to 3 of 3
  1. #1
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169

    Open report in accordance with combo

    Friends, I am trying to create a report with many fields and tables of different (but related).


    As I have many fields, had to do subreports so that the fields to print perfectly.
    I have a button on a form, and I'm trying to open the report in accordance with each company that is
    selected in a combo.
    Before I had a report that I opened with this line of code:

    DoCmd.OpenReport "steps", acViewPreview, , "[CompanyID]='" & Me.combCompany.[Column](0) & "'"
    But now, as I have subreports this code does not work.
    Does anyone have any tips?
    Thank you.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why doesn't it work - error message, wrong results, nothing happens? The subreport records don't synchronize? Are subreport container control Master/Child links properties set?

    CompanyID is a text field type?
    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
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Thank you.

    Sorry, CompanyID is an integer. Fix the line of code and it worked.

    Thank you.

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

Similar Threads

  1. Open Report by Combo box
    By rck3 in forum Reports
    Replies: 2
    Last Post: 05-07-2012, 05:29 PM
  2. Replies: 1
    Last Post: 09-21-2011, 03:21 AM
  3. Using a combo box to open a report
    By Bill Casanova in forum Forms
    Replies: 24
    Last Post: 05-24-2011, 10:42 AM
  4. A Combo box that open another form
    By mar_t in forum Access
    Replies: 14
    Last Post: 01-09-2011, 10:53 PM
  5. Using combo box to open another form
    By ladyairj23 in forum Forms
    Replies: 0
    Last Post: 06-02-2006, 07:03 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