I have a form. Originally, user would enter a keyword in a text box on the form, and the form would refresh displaying all records with that keyword.
I want to refine it more and have 3 options on the form: Server, Volume, Rights.
The user would select one of those three, then enter a keyword and records would be displayed based on that option.
Right now, my form is based off a query that (under the Server Field Criteria) has:
Like "*" & [forms]![frmNovellSearch].[txtSearchWord] & "*"
This returns all keywords found under the server field.
How would I write that query so it does it for whichever field the user selects on the form?
Right now I have:
IIf(([forms]![frmNovellSearch].[optServer])=False,([Dir_Trustees].[Server]),(Like "*" & [forms]![frmNovellSearch].[txtSearchWord] & "*"))
And I have that under each of the 3 fields in the query (of course I've changed the field names), but it doesn't work.
Anyone know how to make this work? I thought I had it working, but no cigar. Any ideas? Suggestions?
Thanks.
I want to refine it more and have 3 options on the form: Server, Volume, Rights.
The user would select one of those three, then enter a keyword and records would be displayed based on that option.
Right now, my form is based off a query that (under the Server Field Criteria) has:
Like "*" & [forms]![frmNovellSearch].[txtSearchWord] & "*"
This returns all keywords found under the server field.
How would I write that query so it does it for whichever field the user selects on the form?
Right now I have:
IIf(([forms]![frmNovellSearch].[optServer])=False,([Dir_Trustees].[Server]),(Like "*" & [forms]![frmNovellSearch].[txtSearchWord] & "*"))
And I have that under each of the 3 fields in the query (of course I've changed the field names), but it doesn't work.
Anyone know how to make this work? I thought I had it working, but no cigar. Any ideas? Suggestions?
Thanks.