Search Code Question

Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jul 2006
Posts: 1
Reputation: sprocket is an unknown quantity at this point 
Solved Threads: 0
sprocket sprocket is offline Offline
Newbie Poster

Search Code Question

 
0
  #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:
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 107
Reputation: madmital is an unknown quantity at this point 
Solved Threads: 3
madmital madmital is offline Offline
Junior Poster

Re: Search Code Question

 
0
  #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 Developer
When something seems too good to be true...it usually is
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC