Can an Access report be searched or (use find) to locate a specific string of
characters?
I have a report with several hundred pages and only want to locate one page
based on a last name and then print that single page.
Thanks in advance for help.
The best method is to simply filter the report so that only that last
name is reported on. Then just print the 'whole' report.
For example, from a form that displays the record with the "Last Name"
of the person you wish to report on, code a command button's click
event:
DoCmd.OpenReport "ReportName", acViewPreview, , "[LastName] = """ &
Me.[LastName] & """"
Note: Searching records by last name is not a good idea. It often
occurs that there may be more than one person with the same last
names, i.e. Smith, Jones, Anderson, etc. How would Access know which
Smith or Jones you wish to report on?
A better method would be to use the PersonID field on the form, which
should uniquely identify each separate person.
Assuming PersonID is a Number datatype:
DoCmd.OpenReport "ReportName", acViewPreview, , "[PersonID] = " &
Me.[PersonID]