You were very close on your query and getting the result... If you use a SQL query without an "INTO" clause, it will just pull the results up in a browse display grid. By adding an INTO clause, it will put into some memory space, such as an array, or another cursor (but could also be another permanent table, but not suggested). Then, you can pull those values into the text properties of your textboxes...
I typically would do into a cursor (of which I prefix the result set with "C_" to know it is a temp cursor vs an actual table, and always pre-close the table in case I needed it left open for future use after the initial setting. This way, no remnant after the newest query.
use in select( "C_MyTmpResult" )
SELECT * FROM emp4win
WHERE idnum=cm
into cursor C_MyTmpResult
data should be store in the following:
txtfirstname.Value = C_MyTmpResult.FirstName
txtlastname.Value = C_MyTmpResult.LastName
txtmiddlename.Value = C_MyTmpResult.MiddleName
txtaddress.Value = C_MyTmpResult.Address
txtcontact.Value = C_MyTmpResult.Contact
You had 2 address lines, but no differentiation between an Address1 vs Address2 and might have just been a posting oversight, but context still holds true if you had two address lines.