Access: Form w/table as Source Filter

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
1,678
When I have a Form based on a query, I am able to filter based on a Combo Box (Use the Combo selection as Criteria in Query).

If you have a Form with its source being a Table, is there a way to filter the data? I only want to see records where [Status] is "Active"
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,133
Office Version
365
Platform
Windows
Not that I know of (at least not easily), which is why it is always best to use a Query for the source of your Form. Even if initially, you aren't filtering anything or doing any calculations, it is always best to create a Query that returns all the fields to use as the source of your Form. then you can easily edit/change it simply by editing your query.

Note that even if you have already created the Form based on the Table, it should be pretty easy to change it. Just create a new query, add all the fields from the table, then go to the Form, open the Properties, and change the "Record Source" property of the Form from the table to the query you just created. All the fields should have the same name, so you shouldn't need to change anything else on the Form to get it to work.
 

welshgasman

Well-known Member
Joined
May 25, 2013
Messages
677
Why can't you use the filter

Code:
Me.Filter = "Client Like ""*" & Me.txtFilter & "*"""
Me.FilterOn = True
Do you do any research before you post here. Google even?
 
Last edited:

Forum statistics

Threads
1,077,772
Messages
5,336,150
Members
399,067
Latest member
CJWFM

Some videos you may like

This Week's Hot Topics

Top