Hello,
I am trying to create a search form on my Access database. The table I am searching is a SQL table that I am linked to via a .dsn. I have looked at tried tried many of the popular search form methods with non of the working. An example of one that I tried is http://www.datapigtechnologies.com/f...earchform.html. The one that does work for a little while is as follows;
The name of my Search Form is "frmSearchRecord"
Build a query based on "dbo_RIM2013" (this has 29 fields)
Out of those 29 fields I need to be able to search through 18 of them
In the criteria I am using this code
Code:
Like "*" & [Forms]![frmSearchRecord]![txtFunction] & "*" Or [Forms]![frmSearchRecord]![txtFunction] Is Null
"txtFunction" is the name of the first text box in my form. I place this in the criteria for each field that I need and using the correct text box name.
This works great as long as I never close the query. Once I close and reopen it the it stops working and will always display all of my records. When I look at the query in design mode I see that my Or statement has been broken off, with
Code:
[Forms]![frmSearchRecord]![txtFunction]
placed in its own column and in the criteria. So then I am left with
Code:
Like "*" & [Forms]![frmSearchRecord]![txtFunction] & "*"
in the criteria of each of my original columns.
I have tried everything I know with my limited knowledge on Access, so any help will be greatly appreciated.
Thanks in Advance