Hi,
Firstly, please forgive me if i am not using the correct 'language' - i am slowly trying to teach meself how to use Access!
I am having real trouble with creating a query where the criteria runs off a form. Basically, I want a 'keyword' search box on a form where the user can type in a single word, and if that word appears anywhere within the 'comments' column, the query should show that row. If the 'keyword' search box is left empty - the query should return everything.
I have almost got this working using the criteria below - but here is my problem...
Like "*" & [Forms]![frmMI]![Comments] & "*"
If i type a keyword in on the form, the query works great. BUT, if i leave the keyword cell on the form blank, the query only returns rows are not null in the comments column.
To help explain..
In my Comments table, 200 rows do not contain any comments, and 100 do. With the code I am using at the moment, if I leave the 'keyword' search box on the form empty, the query only returns the 100 rows with anything in the comments box.
Please please help - its been driving me mad for about 2 days now!
Many thanks....Chris
Firstly, please forgive me if i am not using the correct 'language' - i am slowly trying to teach meself how to use Access!
I am having real trouble with creating a query where the criteria runs off a form. Basically, I want a 'keyword' search box on a form where the user can type in a single word, and if that word appears anywhere within the 'comments' column, the query should show that row. If the 'keyword' search box is left empty - the query should return everything.
I have almost got this working using the criteria below - but here is my problem...
Like "*" & [Forms]![frmMI]![Comments] & "*"
If i type a keyword in on the form, the query works great. BUT, if i leave the keyword cell on the form blank, the query only returns rows are not null in the comments column.
To help explain..
In my Comments table, 200 rows do not contain any comments, and 100 do. With the code I am using at the moment, if I leave the 'keyword' search box on the form empty, the query only returns the 100 rows with anything in the comments box.
Please please help - its been driving me mad for about 2 days now!
Many thanks....Chris