Automate a filter button on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like a command button on a form that will ask which field to search
and what word(s) to search for. These are memo fields with info on books. I
have scanned posts in this group and discovered the following string that
seems to accomplish part of this task:
Like "*" & [What word?] & "*"
I would like to make this very simple for users; they cli ck the button,
answer the prompt questions, hit "enter" and the search executes.
What else do I need in the command?
Where do I put the code after I create the button?
Thanks in advance for any help.
Rod
 
since you haven't received a reply yet - I'll give you a technique but the
use-ability of it may or may not fit for you

your 'filter' concept can be effectively accomplished by trigger a Query

a pre-established Query can dynamically change its search criteria based on
values existing in an open Form. To do this one needs to enter this syntax
in the criteria field of the Query:
Forms!FormName.TextBox

Forms! is literal. FormName is the name of your form and TextBox is
whatever name the textbox has.

your use of Memo fields implies multi word fields which won't work...but
this technique should work fine if you can design toward a single field
textbox...

once the query works then you can base a Results Report or Form on the query
 
Back
Top