I'm going to answer supposing that the table is a native VFP .dbf file. There are many ways to do this, one would be to use normal VFP table processing, something like this:
USE emp4win IN 0 &&Open table
LOCAL cm
cm = thisform.cmb1.Text
*Validate the value of the input textbox here
SELECT emp4win &&Make the table active
LOCATE FOR idnum=cm &&Search for the row you want
IF NOT FOUND("emp4win")
*Handle error when the record doesn't exists
ENDIF
*From now on, just populate textboxes with the found data
thisform.txtfirstname.text = emp4win.firstname
thisform.txtlastname.text = emp4win.middlename
thisform.txtmiddlename.text = emp4win.lastname
thisform.txtaddress.text = emp4win.address
thisform.txtcontact.text = emp4win.contact
Another option would be to use the built-in VFP SQL engine to do the search, pretty much as you've done, just with a catch, remember you must indicate where to save the result in order to use it, almost always using an INTO CURSOR
clause (and then reading from that cursor), otherwise, like in your sample, it will be shown in a BROWSE
window, which is totally useless in an application.