how to query using text box with vba

Discussion created by amie1304 on Jun 4, 2011
Latest reply on Jun 12, 2011 by amie1304
Dear all vba programmer

I have a shapefile with 3 fields: fid, shape, facilities. I wanna query based on facilities field, by typing 1 or 2 beginning words in the text box. The problem for me is the value in the facilities field don???t have first similar word. for example, I wanna search all of school, so how to query? Below is the example of my data.

0 Point SD Negeri Buket Meutuah -->School
1 Point RS Langsa -->Hospital
2 Point Bank Syariah Mandiri -->Bank
3 Point SD Alur Merbau -->School
4 Point Rumah Sakit cut Meutia -->Hospital
5 Point Kantor Samsat Langsa -->Police office
6 Point Mesjid Raya Bujok -->Mosque
7 Point MAN Langsa -->School
8 Point SMP Negeri 7 Langsa -->School
9 Point Kantor Dinas SDA -->Office
10 Point BRI Langsa -->Bank
11 Point Rumah Sakit Umum Langsa -->Hospital
12 Point Pesantren Bustanul Ulum -->School
13 Point Kantor Polisi Militer -->Police office
14 Point Kantor Kecamatan -->Office
??? ???. ???.
Wish somone can help. Thank's in advance