Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 4th, 2007, 01:08 AM
Authorized User
Join Date: Jun 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Like function with wild card and parameter prompt


In the design view of a query, in the Criteria section I have Like [Enter Code] to prompt the user for a code that is searched for a similar (not exact match) in a table. But I need to include the * wildcard before and after what the user enters to get the desired results.

How can this be achieved without having to get the user to enter the * themselves at the prompt? Doing Like *[Enter Code]* automatically places quotes around the prompt causing it to literally search for an actual * character instead of a wildcard.

Thanks for any replies.


EDIT: Colleague found the correct combination of '',&,* below.
Old April 4th, 2007, 01:20 AM
Authorized User
Join Date: Jun 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

In the Criteria of the query design view use:

Like '*' & [Enter Code] & '*'

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wild Card Help * Corey Access 1 March 1st, 2007 11:42 AM
Passing function parameter to query kar22 Access 1 February 27th, 2007 08:28 AM
parameter prompt Bindu Crystal Reports 0 November 30th, 2006 07:56 PM
Wild Search function kuku SQL Server 2000 0 November 17th, 2005 11:01 PM
how to not showing Crystal Report Parameter prompt use4forums BOOK: Professional Crystal Reports for VS.NET 0 April 27th, 2004 07:16 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.