Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter a Form

Status
Not open for further replies.

ajolson1964

Programmer
Mar 25, 2008
31
US
I am having a difficult time applying a filter to a form. What I have is a form that’s control source is a Query with several fields on the form. One of the fields is named JobFunction and that is the field I want to apply the filter too.
What I would like is for the user to open a form then from a drop down list (Combo-box) select a the job function they want then the form display just those Job functions. Any help would be appreciated.
 
I am sorry what I ment is I want this to work on a Report not a Form. Sorry.
 
You want the user to select a job function on a form and open a report with those functions? If so:

Code:
DoCmd.OpenReport "ThisReport", acViewPreview, , "ThisNumericField=" = Me.ThisCombo

Or

DoCmd.OpenReport "ThisReport", acViewPreview, , "ThisTextField='" = Me.ThisCombo & "'"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top