Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

searching name & list all the possiblity?

Posted on 1999-01-17
5
Medium Priority
?
127 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

610 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