Hello
I have a slight problem regarding a form in Access 2007. I have a simple table with a few columns, and a query which takes the text from a form's textbox as a search criteria. If any of a row's fields contain the search-box' string, they are returned in the query. This query is used as the recordset in the same form.
The problem is that even when I requery using a button, the form is not responding with the correct results. If I just open the query with the form with the search-box already being open, the correct results are returned. Instead I just receive the whole table, which is not filtered.
The example-database is provided (2007).
Could anyone please help me in solving this problem?
What I want is that the form will update its results to the query whenever the search-button is pressed.
Search-query (also the recordset of the form):
Code:
SELECT *FROM Kommuner
WHERE Navn Like '*' & forms!Kommuner!txtSøk.Text & '*' Or Postnummer Like '*' & forms!Kommuner!txtSøk.Text & '*'
ORDER BY ID;