Reports are based on????

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ron

    Reports are based on????

    Hi All,

    I needed a report so I used the report wizards to make it based on a query I
    made (also made with a wizard). That all works great.

    However, now I need a identical report only based on a subset of the data I
    used for the first report...plus, a little other info (from another query).
    I thought, okay, I'll copy the first report and rename. Except it's source
    is the 1st query. I need it's source to be another query. Not a problem,
    just copy the query, rename it, change it accordingly and used that as the
    2nd report's source, and viola. There's my new report.

    But, now I've got 2 querys and 2 reports to maintain--plus some subreports I
    have to worry about too...so now I've got 2 of those, etc.

    If my user says "gee, sure would be cool if these reports hand "x" in them
    too, then I've got to change multiple reports/querys/subreports, etc. A
    pain.

    Is there a way to tell access to run a report, but instead of the report
    being based on a specific query (hardwired, so to speak in the "source" area
    of the report), have it use different querys with basically the same info,
    chosen at runtime? And, if it's possible, can someone point me to where I
    might find the correct way to do this?

    Thanks,
    ron


  • Larry Linson

    #2
    Re: Reports are based on????

    The Command Button Wizard will generate code in its Click event to execute a
    Report. You can put your cursor on the DoCmd.OpenRepor t in the Module
    window, then press F1 to see help on the WhereCondition argument of
    DoCmd.OpenRepor t. Then if you'd post back here stating the name of the
    Control on the Form where the user will select the value to be matched, and
    the name of the Field in the Query that identifies the Record, I suspect
    someone will help you with writing the code, if you aren't already familiar
    with doing so.

    Larry Linson
    Microsoft Access MVP


    "Ron" <ronSPAMBLOCKIN Gwest777@verizo n.netwrote in message
    news:bqOEh.2653 $KE2.78@trnddc0 6...
    Hi All,
    >
    I needed a report so I used the report wizards to make it based on a query
    I made (also made with a wizard). That all works great.
    >
    However, now I need a identical report only based on a subset of the data
    I used for the first report...plus, a little other info (from another
    query). I thought, okay, I'll copy the first report and rename. Except
    it's source is the 1st query. I need it's source to be another query.
    Not a problem, just copy the query, rename it, change it accordingly and
    used that as the 2nd report's source, and viola. There's my new report.
    >
    But, now I've got 2 querys and 2 reports to maintain--plus some subreports
    I have to worry about too...so now I've got 2 of those, etc.
    >
    If my user says "gee, sure would be cool if these reports hand "x" in them
    too, then I've got to change multiple reports/querys/subreports, etc. A
    pain.
    >
    Is there a way to tell access to run a report, but instead of the report
    being based on a specific query (hardwired, so to speak in the "source"
    area of the report), have it use different querys with basically the same
    info, chosen at runtime? And, if it's possible, can someone point me to
    where I might find the correct way to do this?
    >
    Thanks,
    ron
    >
    >

    Comment

    Working...