hello every one this is the query i use in VBA with a querydef definition<br><br>Dim dbs As Database<br>Dim qdfTest As QueryDef<br>Dim strSQL As String<br>Set dbs = CurrentDb()<br><br>strSQL = "SELECT Stoffen.STOFNAAM, Stoffen.SYNONIEM_1, Stoffen.SYNONIEM_2, Stoffen.SYNONIEM_3, " & _<br>"Stoffen.FORMULE, Stoffen.CAS_NUM, Stoffen.GEVAAR_SYM, Stoffen.MOL_GEW, Invoer.RUIMTE, " & _<br>"Invoer.HOEVEELH, Invoer.EENHEID, Invoer.Plaatscode, Invoer.UGD, Invoer.datum, " & _<br>"Invoer.leveranc , Invoer.zuiverh, Invoer.certnr, Invoer.lotnr, Invoer.memo " & _<br>"FROM Invoer RIGHT JOIN Stoffen ON Invoer.STOF_REF = Stoffen.STOF_REF " & _<br>"ORDER BY Stoffen.STOFNAAM"<br><br>dbs.QueryDefs.Delete "query2"<br>Set qdfTest = CurrentDb.CreateQueryDef("query2", strSQL)<br>DoCmd.OpenQuery "query2", , acPreview<br><br><br>My question is in wich part and wich way i need to ajust the code to let the user give an item to search for what needs to be in the record it is always tekst but it don't need the be exactly that word.<br><br>sincerly warrior