xcust_id = alltrim(this.value) With thisform If not empty(xcust_id) set exact on Select ffcust Set order to custid If Seek(xcust_id) lget = .f. .txtcompany.value = Custname .txtcontact.value = contname *.txtpostcode.value = postcode .txtaddress.value = address .txtcity.value = city .txtcountry.value = country .txtoff_tel.value = tel .txtext.value = " " .txtmobile.value = "" .txtemail.value = email *xcust_id = .txtcust_id.value * some code block * else Messagebox("Customer Id not Found!",0+64,"Record Search",1500) IF messagebox("Do you want to add now?",4+32+512,"New Customer")=6 do form new-ffscustomers with xCust_id ELSE lAppend = .F. Endif Endif Endif EndWith If empty(xcust_id) keyboard Chr(32) lseek = .t. Do form forms\sele-fcust Endif