Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Cedar Falls, Iowa, USA
    Thanked 0 Times in 0 Posts

    query-by-form (A2000)

    I have a number of reports whose record source includes the same subquery. That subquery has several parameters. I'd like to use the query-by-form technique for previewing and printing those reports. However, all the query-by-form examples I'm seeing are for a single report.

    I need to be able to choose which of the up to 20 reports that use those parameters I want to preview and/or print. Can someone suggest an approach or have an example of a query-by-form used for multiple reports? Any guidance is welcome.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: query-by-form (A2000)

    You could create a list box or combo box on the form to list the appropriate reports; the easiest way to populate the list box or combo box is to create a table with the report names and use that as row source.

    Then, instead of DoCmd.OpenReprt "Fixed Report Name", ... you can use DoCmd.OpenReport lbxReports, ... (if you use a list box named lbxReports).

    There are other ways to populate the list box or combo box. The threads starting at <post#=140553>post 140553</post#> and <post#=186365>post 186365</post#> will give you some ideas. One of them is for listing forms, but it can be adapted for reports without much trouble.

Posting Permissions

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