Microsoft KB Archive/92682

{|
 * width="100%"|

ACC1x: Parameter Queries, Wildcards, and SQL Server

 * }

Q92682

-

The information in this article applies to:


 * Microsoft Access versions 1.0, 1.1

-

SUMMARY
The asterisk (*) and the question mark (?) wildcard characters are not valid in SQL Server parameter queries and thus are interpreted by SQL Server as text. Unless these characters are present in the field restricted by the parameter, the query will return an empty set.

Instead of using the asterisk (*) and the question mark (?) wildcard characters in parameter queries, use the percent sign (%) and the underscore (_), the SQL Server wildcard characters.

MORE INFORMATION
SQL Server uses the percent sign (%) and the underscore (_), the ANSI standard wildcard characters, whereas Microsoft Access uses the asterisk (*) and the question mark (?) wildcard characters. When executing a parameter query, Microsoft Access does not translate the wildcard equivalents; the string you type in the Query Parameters dialog box is passed verbatim to SQL Server. Microsoft Access translates only strings that are part of the QBE grid.