Explore BrainMass

Access Wildcards

Here's what Access says about searching for wildcards:

When using wildcard characters to search for other wildcard characters such as an asterisk (*), question mark (?), number sign (#), opening bracket ([), or hyphen (-), you must enclose the item you're searching for in brackets. If you're searching for an exclamation point (!)or a closing bracket (]), you don't need to enclose it in brackets. For example, to search for a question mark, type [?] in the Find dialog box. If you're searching for a hyphen and other characters simultaneously, place the hyphen before or after all the other characters inside the brackets. (However, if you have an exclamation point (!) after the opening bracket, place the hyphen after the exclamation point.)

You can't search for the opening and closing brackets ([ ]) together because Microsoft Access interprets this combination as a zero-length string. You must enclose the opening and closing brackets in brackets ([[ ]]).

So, if I had a table named X with column TEXT_FIELD with values:

a b c d e f

and wanted to search for a row that actually had asterisks in it, what would I put in the blank?

WHERE x.TEXT_FIELD Like _______;


Solution Summary

Searching for wildcards is demonstrated.