>>Hi All, >> >>how can i use this line Iif(Empty(thisform.txtID.Value),'.t.','CrsTable.ID=thisform.txtID.value') in T-Sql where clause? >> >>Thanks > >Solved myself :) > >WHERE vw_CrsStokhb.fiskodu = CASE WHEN @fiskodu is not null then @fiskodu ELSE vw_CrsStokhb.fiskodu END