07/20/08

 

Using ADO wildcards in the Access query design grid (2000)

A short while ago, we told you about the different wildcards ADO exposes for SQL strings. As you may recall, the percent (%) and underscore (_) characters replace the asterisk (*) and question mark (?) wildcards used by DAO to match strings or a specific character. Often, developers will create queries in the query design grid and then copy the SQL statement to adapt and use in code. However, Access 2000 continues to support the DAO wildcards when working in the design grid. Although it isn't a documented technique, we've discovered that there is a way to use ADO wildcards in Access 2000. Instead of using the Like operator in your criteria expressions, use ALike. For instance, you could use the criteria

ALike "_r_s__n%"

to replace the expression

Like "?r?s??n*"

Created Date: 12/11/2001  Last Reviewed: 12/11/2001  Rev. Date: 

This site was last updated 06/11/06