matoo 28 Newbie Poster

thank you so much it worked as a charmed.

dim y as control
for each y in controls
    if typeof y is commandbutton then
        if y.name = strbuttonmame then
            y.caption = stric & " [" & rsdiscriptionfind!Qty & "]"
        end if
    end if
next
rproffitt commented: Good to read you applied the lead and fixed it. +10
matoo 28 Newbie Poster

thanks reverend jim my mistake thanks for pointing out i use response in what ever code i write for myself so in the description they were using reply and i used description in a mistake

Reverend Jim commented: Yeah. I've done that. +12
Nutster commented: Setting Option Explicit at the beginning of the file can help catch this kind of thing. +6
matoo 28 Newbie Poster
rsCSearch.Open "SELECT * FROM Customer WHERE CName LIKE " & "'" & TxtCSearch.Text & "%'", gobjConn, adOpenStatic, adLockOptimistic

got it working % was missing thanks for your time

matoo 28 Newbie Poster

I am trying to write program in vb6.0, in which i am using ms access database. i want to search in a table called "customer". the Field is called "Name". in the feild i have saved full name e.g Asmat Ullah Khan, Asmat Khan, Asmat Ullah. now what i want to do is search only Asmat and it should go through whole table and display all the names in listview i.e Asmat Ullah Khan, Asmat Ullah, Asmat Khan. how can i search to get this result.Thank you