Solved MS Access Criteria code for searching a number value in a FORM

waleedimtiaz

New member
Local time
Today, 11:50
Joined
Feb 14, 2023
Messages
15
I am facing a problem in searching by exact number value in the continuous form consisting of some records. Whenever I type the criteria in the query as "[Forms]![IncidentsSearchForm]![RevitIDSearch]" the default view of the continuous form doesn't show all the list of records, but when I search the value I do get that record. So basically I want to see all the records in that continuous form before I run the search operation. Note: I am searching by tyoing in a textbox and pressing ENTER, NO BUTTON.
 
Try this in the after update event of the textbox:

Me.Filter = "FieldName = " & Me.RevitIDSearch
Me.FIlterOn = True

I'd add a test to see if anything is entered, and turn the filter off if not.
 

Users who are viewing this thread

Back
Top Bottom