Only filtered records in a report?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a report but only want it to display the currently filtered
records from the table and not the whole table.

Or... a prompt for the value in the field to be filtered and displaying
only those filtered records would work.
 
If you are working in a form, display a "current" record (and you ARE using
a form to display records, right? -- tables store data, forms display it),
you can use a command button to add code that opens the report. The syntax
for this includes a variable you can use to filter...

DoCmd.OpenReport (see Access HELP for specific syntax)
 
As Jeff suggests, your records should be displayed in a form. You can then
use
Dim strWhere as String
strWhere = Me.Filter
DoCmd.OpenReport "rptYourReport", acPreview, , strWhere
 
Back
Top