Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 4th, 2007, 01:08 AM
Authorized User
Join Date: Jun 2006
Location: , , .
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.
Reply With Quote
  #2 (permalink)  
Old April 4th, 2007, 01:20 AM
Authorized User
Join Date: Jun 2006
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

In the Criteria of the query design view use:

Like '*' & [Enter Code] & '*'
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 03:36 AM.

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