Search table fields via textboxes
-
I have a form with two textboxes. One is txtForname and other is txtSurname and I also have a search button btnSearch. I have a table from a MSAccess database below this. The table has the fields "Forname" and "Surname" and what i would like is to, when you type something in either "Forename" or "Surname" the results automatically display in table when button search is clicked like a query when searching a field in a table. How would I do this?
In the end we're all just the same
-
I have a form with two textboxes. One is txtForname and other is txtSurname and I also have a search button btnSearch. I have a table from a MSAccess database below this. The table has the fields "Forname" and "Surname" and what i would like is to, when you type something in either "Forename" or "Surname" the results automatically display in table when button search is clicked like a query when searching a field in a table. How would I do this?
In the end we're all just the same
Here is an approach I have used: 1) Create an unbound form with 2 text boxes txtForname, txtSurname and your search button, btnSearch. 2) Place a subform on your form which includes your datatable; Employees (or whatever) 3) Put code behind the btnSearch on the Click event that sets a filter for your subform. Example: me.employee_subform.Form.Filter = me.txtForname.value me.employee_subform.Form.FilterOn = true this should get you a head start; you will need to consider blanking out fields and determining which field to filter on.
-
I have a form with two textboxes. One is txtForname and other is txtSurname and I also have a search button btnSearch. I have a table from a MSAccess database below this. The table has the fields "Forname" and "Surname" and what i would like is to, when you type something in either "Forename" or "Surname" the results automatically display in table when button search is clicked like a query when searching a field in a table. How would I do this?
In the end we're all just the same
Here i search the table and display data in the Grid http://www.codeproject.com/KB/cs/N-Tier22.aspx[^] Is this Similar to what you want ?
Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za