Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Durham, North Carolina, USA
    Posts
    140
    Thanks
    5
    Thanked 1 Time in 1 Post

    Using wildcards in a 'WHERE' condition for ApplyFi (Access 97)

    Howdy,

    A client of mine is using macros (I know, I know) to filter a table based on what's been entered in a text box, using the ApplyFilter action.The argument looks like this:

    [Human]![Name]=[Forms]![Primer form]![Text66]

    Since the text box doesn't list the items available to filter, he'd like to be able to use a wildcard. Simply prepending "Like" to the expression doesn't work. What am I missing? Can a wildcard be used in the text box, and if so, how do I make that happen?

    Thanks in advance,

    Beej

  2. #2
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using wildcards in a 'WHERE' condition for ApplyFi (Access 97)

    You could try changing the text control to a Drop Down control based on a SELECT DISTINCTROW query. That way you would always have the current available search criteria.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Using wildcards in a 'WHERE' condition for ApplyFi (Access 97)

    Instead of a text box, you could use a combo box. But if you want to use wildcards, try this:<pre>[Human]![Name] Like "'*" & [Forms]![Primer form]![Text66] & "*'"</pre>

    Note the use of single quotes around the value.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •