Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    13

    Unanswered: How to use a forms RecordSet in a Report

    I have a form that when a user clicks the print button brings up the corresponding report in preview, this works fine until I run a filter on the form and then go to print it. I need to find a way to use the same RecordSet as the form so I can print only the data that has been filtered.

    I have tried to pass the filter, but it doesn’t sort it right, I have also tried the following code:

    Set Reports![Inst Report].Recordset = Forms![Inst Report].Recordset

    But I get an error...

    Is there a way to accomplish this?


    Thanks,
    Mike

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: How to use a forms RecordSet in a Report

    Originally posted by Majestic12
    I have a form that when a user clicks the print button brings up the corresponding report in preview, this works fine until I run a filter on the form and then go to print it. I need to find a way to use the same RecordSet as the form so I can print only the data that has been filtered.

    I have tried to pass the filter, but it doesn’t sort it right, I have also tried the following code:

    Set Reports![Inst Report].Recordset = Forms![Inst Report].Recordset

    But I get an error...

    Is there a way to accomplish this?


    Thanks,
    Mike
    In the report, set Me.Filter=Forms![Inst Report].Filter and set Me.FilterOn=True

  3. #3
    Join Date
    Dec 2003
    Posts
    13
    Is there a way to include the way the form was sorted in the report?

Posting Permissions

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