Report and sub report

Posted on 2004-11-06
Last Modified: 2010-05-02
I’m using Access 2003; I have a report in my database which has a sub report on it.
I use this for keeping track of family drugs. Who is taking what and so forth. I the main report I have a listing of all the drugs for that family member. At the top of the report is where the sub report is. This report only shows the names of the doctors for that member only. My question is how to hide the sub report for all the members of the family except for dad. So when I print the report for my dad it show doctors name but when I print it for others I don’t want the sub report to show. Can this be done?
Thanks for any help.
Question by:cdb424ttm
    LVL 12

    Expert Comment

    It should be a simple matter of excluding the information you don't want, from your data source for the report. If you could post the code you are using, might be able to help a little easier.

    LVL 3

    Accepted Solution

    What are you using to print the report out, Crystal, ms access, visual basic reports?  

    If your using crystal reports or vb reports you can easily edit the sql string limiting what the detail section of the report gets to print to the report.

    Author Comment

    using access 2003 NBrownoh

    Author Comment

    no answer on this pelase give not points and close question out.
    LVL 12

    Expert Comment

    The answer to your question is Yes it can be done.
    LVL 12

    Expert Comment

    If you would like to respond to the comments I'm sure someone can give you the help you apparently need.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now