Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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
  #1 (permalink)  
Old August 10th, 2007, 12:54 PM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default query name search

i'm trying to do a real simple name search. i've created a basic query and i'm using this as my criteria :

Like [Forms]![Fseptic]![TxtClientName]+"*"

what i need is to be able to look up any records that contain what ever i type in my text box. this only looks up the first part of my names. i need the ability to look up any names that have any of the letters i choose to search by. i just need the correct syntax here. does anyone know what it is?

  #2 (permalink)  
Old August 13th, 2007, 12:19 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

If you want any of the letters, but in the order that they were typed in, change your query criteria to:

Like "*" & [Forms]![Fseptic]![TxtClientName] & "*"

+ should only be used to add integers. & is to concatenate strings.

If you want any of the letters in ANY order, we can do that too. Just let me know.





mmcdonal


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query to Search for a value in a table Vendirella SQL Language 0 October 10th, 2007 12:47 AM
search query problem keyvanjan Classic ASP Basics 3 May 11th, 2006 11:01 AM
Trimming a query for search arnabghosh Classic ASP Databases 1 May 31st, 2005 07:39 AM
Users selection driven search query... mat41 Classic ASP Databases 3 November 16th, 2004 03:14 AM
Multiple Joins in Multiple Table Search query pookster Access 4 September 23rd, 2004 03:04 PM





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