Filter Data in Report

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

Guest

I have a report that contains a customer listing with phone numbers. I want
to filter out all of the customers who do NOT have a phone number. Do I need
to go back and run a query off of my table or is there a way to filter data
directly from the report designer?
 
Domenick said:
I have a report that contains a customer listing with phone numbers. I want
to filter out all of the customers who do NOT have a phone number. Do I need
to go back and run a query off of my table or is there a way to filter data
directly from the report designer?


Normally, a button on a form is used to open a report. In
this case, you can use the OpenReport method in the button's
Click event procedure to filter the report. The code in the
event procedure would look something like:

DoCmd.OpenReport "reportname",,,"phonefield Is Null"

If you do not use a form, then it will be necessary to use a
query to filter the data. This can be done most easily by
setting the report's RecordSource property to this kind of
SQL statement:

SELECT * FROM thetable WHERE phonefield Is Null
 
Back
Top