if checkbox1.Checked=true then
adoq1.SQL.Add('where job_id between '''+edit1.text+''' and '''edit2.text+'''');
adoq1.Open;