Solved

searching name & list all the possiblity?

Posted on 1999-01-17
5
120 Views
Last Modified: 2010-05-03
if i input let say name = bil
so i like to get all the name that begin with "bil"
such as bill gates, bill clinton, bil and etc
pls help me out
0
Comment
Question by:pohkheng1
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 100 total points
ID: 1469054
You haven't specified exactly how you do the search, what data you are using, but generaly you can use Like to compare:
IF MyName$ Like "bil*" then 'do something
0
 

Author Comment

by:pohkheng1
ID: 1469055
if i input let say name = bil
    so i like to output all the name that begin with "bil"
    name such as
    bill gates, bill clinton, billy and etc that is the name that contain the string "bil" in it     name will be display
    pls help me out
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1469056
Do you have a database, or a list where all the available names are stored?
0
 

Author Comment

by:pohkheng1
ID: 1469057
yes
i'm using sql to query the match of  the input name
if the name contain the string of the input name
the record will be keep in the recordset and display in flexgrid
the problem is how the sql statement will look like
the sql are
sSql = "SELECT * FROM Makpel" & _
       " WHERE Makpel.nama = " & _
       Chr(34) & nama_s & Chr(34) & _
       " OR Makpel.nomatriks = " & _
       Chr(34) & nomatriks_s & Chr(34) & _
       " OR Makpel.alamatsemasa = " & _
       Chr(34) & alamat_s & Chr(34) & _
       " OR Makpel.namawaris = " & _
       Chr(34) & namawaris_s & Chr(34) & _
       " ORDER BY nama;"
Set daorst = daodb.OpenRecordset(sSql)

WHERE DO I HAVE TO AND THE * ?????
THANK
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1469058
You can use the Like is SQL clause as well:
"SELECT * FROM Table1 WHERE Name Like 'bil*'"
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now