Link to home
Start Free TrialLog in
Avatar of popsicle
popsicle

asked on

print filtered or selected records

I was wondering if there was a way to print only records that were selected or based on a filter on the fly.  I want to be able to print either in report form or datasheet view specific records that have been filtered.  The best equivalent I could say would be in excel I was able to select 10 random records and print the selection.  Is something like this possible in access without actually going to the datasheet view and manually selecting the records?
ASKER CERTIFIED SOLUTION
Avatar of devtha
devtha
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of popsicle
popsicle

ASKER

This may be what I am looking for, i am not sure,i have a main form that I use to view and enter records. I want to be able to print from that form either the record I am currently viewing or all of the records that fit the filter that is currently on the form.  Does this do that?  If it does, could you be more specific about how.
Yes it will do it.
First when the report is opened it gets all the records that are available to it via the recordsource (query or table) QUERY in this case. Then we apply filter that gets the
value = to the value you provide from the form.
In my case
forms![form_you_build]![ssn]
In your case
forms![main]![ssn].

On the second thought what ever method you are using (query) fro viewing the records on the form then use the same query for the report and the on ONOpen event pase the code I have given you.