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!

AutoFilter

Status
Not open for further replies.

SYToth

IS-IT--Management
Mar 29, 2006
2
US
Is there an easy way to implement an AutoFilter type of function in Access? Most of the Microsoft references apply to Excel and or Access Web.

Here is the situation:

Take a table of 20 rows and one field. There are multiple occurrences of only 3 different user defined values in that one field. I would like to create a combo box or list box that lists only the three different values, not all 20 entries, and show the user only the records that match the selection. Just like AutoFilter in Excel or the "Index on [field] unique" command in FoxPro.

Thanks!
 
Me.Filter = "txtCompany ='" & Me.cboCompany & "'"
Me.FilterOn = True

or to filter subform, from main form

Me.sfrmCompany.Form.Filter = "txtCompany ='" & Me.cboCompany & "'"
Me.sfrmCompany.Form.FilterOn = True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top