| | |
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
![]() |
•
•
Join Date: Jul 2006
Posts: 1
Reputation:
Solved Threads: 0
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:
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:
•
•
Join Date: Jun 2005
Posts: 107
Reputation:
Solved Threads: 3
You probably "search" you database using
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
To select only rows where a specific column equal 'S' and then whatever, you could go
Of course is these different type searches is to be carried out form the same input search field, you need some sort of evaluation.
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
When something seems too good to be true...it usually is
![]() |
Similar Threads
- Search code in a database (Visual Basic 4 / 5 / 6)
- search code not working!!! (VB.NET)
- ADODC Search code (Visual Basic 4 / 5 / 6)
- code tags (DaniWeb Community Feedback)
- C# Code Question (C#)
- Search code ... (Visual Basic 4 / 5 / 6)
- find out the error in my code (Java)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: foxpro help
- Next Thread: need help in VB Code
| Thread Tools | Search this Thread |





