Results 1 to 4 of 4
  1. #1
    dinorbaccess is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    27

    Question Pass subform filter to a report

    Hello AccessForumers,



    I have a problem which seems to be an easy task but I cant figure it out by my own, so heres my question:

    I have a subform with records. From the records of this subform Ive created a report. And I can print this report. So far, all OK.

    But when I filter my records in my subform (datasheet view) and I want to print them, it prints all the records of my subform source. Of course I can filter then a record with access filter tools, but I want to pass the filter of my subform on a button_Click.

    Can anyone help me do that...

    Be sure I appriciate all your sugestions.... Thank you all.

    here you have an example of my problem. Lets say I want to filter all my Persons that dont have a TelephoneNumber inserted, and the print them in a mouseclick button.

  2. #2
    dinorbaccess is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    27
    Please guys , I really need this to finish my project.

  3. #3
    dinorbaccess is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    27
    ANY sugestion.... Just replay please !!!!!
    Last edited by dinorbaccess; 01-10-2011 at 01:39 PM.

  4. #4
    dinorbaccess is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    27
    Ive got it solved fellas.

    Is just this line of code
    Code:
     docmd.openreport "rptWhatever",acViewPreview, , me.subform.form.filter
    Thnx everybody

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Pass Subform filter to subform in report
    By camftm in forum Programming
    Replies: 16
    Last Post: 07-19-2011, 07:12 AM
  2. Filter a subform based on mainform
    By Cheshire101 in forum Queries
    Replies: 3
    Last Post: 01-06-2011, 12:56 PM
  3. Filter on subform doesn't work
    By Edwardo in forum Programming
    Replies: 6
    Last Post: 11-29-2010, 08:57 PM
  4. Filter command not working for subform
    By yes sir in forum Access
    Replies: 15
    Last Post: 10-15-2010, 10:06 PM
  5. how to pass pk to subform
    By ahmed.gomaa in forum Forms
    Replies: 9
    Last Post: 03-21-2010, 10:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums