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,177
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
679
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,078,504
Messages
5,340,773
Members
399,395
Latest member
KJAC

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top