Results 1 to 4 of 4
  1. #1
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Multiple Forms Launching the same Report (Access 2

    I've created a report (with numerous sub-reports) launched from a form (which selects which record that is reported on). The data source for the report and sub reports are a series of queries that use the record number displayed on the form.
    So far, so good.
    Now, I've discovered that another group would like to use the same report - however, they do not have access to the original form. It seems inelegant to create another series of queries and reports that duplicate the original (not to mention setting up twice the maintenance down the road).
    So I've been playing around with the queries without success trying to find a way to structure the criteria so that it will use the record number from either form. (It will - but it spawns Parameter Query boxes repeatedly for the missing form).
    So I'm wondering anyone has a suggestion about:
    1) A function for the query that I've missed.
    2) Writing the SQL query on the On Open event for the report.
    3) another method I haven't mentioned.

    TIA
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  2. #2
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Multiple Forms Launching the same Report (Access 2

    could you write a VBA that would set the SQL for the on open based on the form that is opening it? You could use the onopen event check the previous active object and then choose the SQL based on that SCrren.previouscontrol
    Would that work?

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multiple Forms Launching the same Report (Access 2

    Could you use the WhereCondition argument of DoCmd.OpenReport to pass the parameter to the main report?

    Could you use the Link Master Fields and Link Child Fields properties of the subreports to pass the parameter from the main report to the subreports?

  4. #4
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Multiple Forms Launching the same Report (Acce

    thanks!
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •