User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 402,454 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,021 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser: Programming Forums
Views: 1466 | Replies: 1
Reply
Join Date: Jul 2006
Posts: 1
Reputation: sprocket is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sprocket sprocket is offline Offline
Newbie Poster

Search Code Question

  #1  
Jul 12th, 2006
I have an Access form that runs a search on a query and returns the results to a listbox on the same form. I have two question regarding the search functionality.

1. Is it possible to search for the exact value for instance I have a Movie rating column and if I put in G and search I get the results for G, PG and PG-13 when all I wanted were G movies..

2. Is it also possible to search starting with the first letter. For example if I put an S in the Movie title line it will only return Movies starting with the letter S and not every single Movie with an S in it.

Thanks in advance for any help it is greatly appriciated. :cheesy:
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2005
Location: Denmark, EU
Posts: 102
Reputation: madmital is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 3
madmital madmital is offline Offline
Junior Poster

Re: Search Code Question

  #2  
Aug 6th, 2006
You probably "search" you database using
LIKE '%value%'

The above means whatever may come before, value, whatever may come after.

To select only rows where a specific column equal 'G', you need to use LIKE 'G'

To select only rows where a specific column equal 'S' and then whatever, you could go LIKE 'S%'

Of course is these different type searches is to be carried out form the same input search field, you need some sort of evaluation.
Web Programmer
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MS Access and FileMaker Pro Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum

All times are GMT -4. The time now is 3:20 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC