Re: Filter list box by text box

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Edward H via AccessMonster.com wrote:
>I have a query form. The form have many text boxes. I want to use the values
>entered in these text boxes in order to requery my list box. My list box is
>linked to a query that displays all entries in my table.
>Basically, I want to search my table according to the MemID or FirstName or
>LastName. So If I enter a name in the FirstName text box, and click
>FindRecord. I want my list box to display all matching fields.


When the text box(es) must always have a value, you can get
away with simply using a criteria in the list box's row
source query like:
=Forms!nameofform!nameoftextbox

However, when the text box might not have a value, you need
to expand it to:
=Forms!nameofform!nameoftextbox OR
Forms!nameofform!nameoftextbox Is Null

--
Marsh
MVP [MS Access]
.



Relevant Pages

  • Re: access 2003
    ... I removed the parameters from the form query source. ... boxes from the form header, events, code, etc and ran the form query source ... forms queries and the SQL because syntax of the SQL will change randomly. ... the Access 97 database, I wouldn't have thought any expressions would be ...
    (microsoft.public.access.conversion)
  • Re: Different data shown based on user input
    ... my advice changes with the info that there are over 200 checkboxes. ... I suggest you use combo boxes. ... Dim strStub As String ...
    (microsoft.public.access.queries)
  • Re: Parameter query with multiple check boxes
    ... those 25 check boxes". ... Does the report get the info from the query which gets info ... "Duane Hookom" wrote: ...
    (microsoft.public.access.queries)
  • RE: Checking for null fields before running query
    ... I could use that sub and modify it so that it checks for Null in the ... return at least one record when all 3 controls have values. ... 3 cbo boxes, 2 buttons, 12 txt fields. ... the cboboxes provide parameters for a query, and also criteria for 12 DSum ...
    (microsoft.public.access.modulesdaovba)
  • Re: access 2003
    ... I removed the parameters from the form query source. ... synchronize combo boxes to the detail section or the parameter form query ... forms queries and the SQL because syntax of the SQL will change randomly. ... the Access 97 database, I wouldn't have thought any expressions would ...
    (microsoft.public.access.conversion)