Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Filtering or Expression

Author  Topic 

Gary Costigan
Yak Posting Veteran

95 Posts

Posted - 2004-11-19 : 11:47:15
I have a report built and would like to place a filter so that I don't see all the data in the table. One Text Box is called CaseStatus and I would only like to see cases that are Open.

I've gone through the MS help index and still can't figure out how to set the Control Source to filter on the word Open.

Thanks.

GC

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-11-19 : 11:50:31
is your report based on a query? if so, edit the query to fitler on that column. if the report is based off of a table, in the report's Control Source property double-click on it, and it will ask you if you'd like to create a query based on that table. say "yes" and create a new query, select what you need from the table and add the filter as needed.

before you play with reports, you may want to stop and just experiement with queries and how filtering and selecting and joins work to get a feel for it. only when you are convinced a query is returning data you want/expect should you try to design a report.

- Jeff
Go to Top of Page

Gary Costigan
Yak Posting Veteran

95 Posts

Posted - 2004-11-19 : 12:02:29
Jeff,

Thanks for the quick response. I'm using an older version of Access'97. When I open up the properties of the TextBox called CaseStaus which is feeding off the Column CaseStatus in the table, and double click, the field changes to the next column in the table. With this version beside Control Source is Case Status and then to the far right I get the three ... that when clicked open up the expression builder. Can the expression builder create the filter I need, or should I just build a query and then feed the report off the query?

GC
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-11-19 : 12:28:19
no -- filter the ROWS returned on the report has nothing to do with the text box itself. a textbox is just something that is displaying a value or calculation or formula from the recordset that the report is bound to -- you need to filter the recordset itself. this is a property of the report as a while, not a property of a text box on it.

in the upper left hand corner of the report is a little box that lets you select the Report object -- right-click on this and choose properties. there you will see the properties of the entire report (not just a control or a section of it). in there, under Data, is the Control Source of the entire report which is a table or a query. there is where you do all filtering. does this make sense?

- Jeff
Go to Top of Page

Gary Costigan
Yak Posting Veteran

95 Posts

Posted - 2004-11-19 : 15:54:21
Got it!!

Thanks for your help.

GC
Go to Top of Page
   

- Advertisement -