Search Field for TDBGrid lazarus / 16-Databases ---------------------------------------------------------------------- linuxdesire · 2020-04-16 20:19 I had found a tutorial on how to make a search field using a checkbox and then typing your search in the edit box. But stupid me did not bookmark it and I have not been able to find it since. All I need is a tutorial that will let me search my SQLite3 records and either show me in my DBGrid or in another edit field. Will someone point me in the right direction please. I have searched this forum but it is giving me combo boxes and I don't want that. Thank you. ---------------------------------------------------------------------- mangakissa · 2020-04-17 07:55 TDGris is not the place to search. It only diaplys your data. Use lacate to search records. When found your dbgrid goes to the founded record. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SQLQuery1.locate('name',vararrayof(['lazarus']),[]) ---------------------------------------------------------------------- linuxdesire · 2020-04-17 14:23 Thank you for the response. I am new at this. I was able to get one search field to work using your locate. I have one question. 1. How can I search two other fields, Cast and Plot. I tried putting more than one SQLQuery search on the same button click but that did not work. Thank you. ---------------------------------------------------------------------- mangakissa · 2020-04-20 07:33 There are two ways to search  in ypur dataset. 1. Rewrite your query with a where clause. This is database sensitive. Therefore a communication is started to te server to get the result you asked. But Not simple to go back. You have to send the original query back to get all records you want. Actually it's a filter, not a search. 2. Use proprty locate. You can search on multple fields. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SQLQuery.locate('cast;plot',vararrayof([value1, value2]),[])  . https://wiki.freepascal.org/locate It's a internal matter. You're searching in the founded dataset. Your only problem is when you use property packedrecords. https://wiki.free pascal.org/SqlDBHowto#Why_does_TSQLQuery.RecordCount_always_return_10. 3F ---------------------------------------------------------------------- linuxdesire · 2020-04-20 18:46 Thank you for answering. Not sure about the vararrayof, I am getting an error on that. Also, value1, value2 samet hing. Stating that Identifier not found for, vararrayof, value1 and value2. I am looking it up in Google, but not any help. Still new at this, as you see. Thank you for your help. ---------------------------------------------------------------------- mangakissa · 2020-04-21 06:31 you need the unit variants by uses