W
Weezie1383
Hi,
I have a wildcard search which is linked to a form with 2 textboxes on it
which allow my users to enter search criteria. My current SQL statement looks
like this:
SELECT DOCUMENTS.[UNIQUE ID], DOCUMENTS.[DOC ID], DOCUMENTS.[DOC TITLE]
FROM DOCUMENTS
WHERE (((DOCUMENTS.[DOC ID]) Like [Forms]![frmWildcardSearch]![cboDocNumber]
& "*") AND ((DOCUMENTS.[DOC TITLE]) Like
[Forms]![frmWildcardSearch]![cboDocTitle] & "*")) OR (((DOCUMENTS.[DOC
TITLE]) Like [Forms]![frmWildcardSearch]![cboDocTitle] & "*") AND
(([Forms]![frmWildcardSearch]![cboDocNumber]) Is Null)) OR (((DOCUMENTS.[DOC
ID]) Like [Forms]![frmWildcardSearch]![cboDocNumber] & "*") AND
(([Forms]![frmWildcardSearch]![cboDocTitle]) Is Null)) OR
((([Forms]![frmWildcardSearch]![cboDocNumber]) Is Null) AND
(([Forms]![frmWildcardSearch]![cboDocTitle]) Is Null));
This search currently only will return search results if the word typed in
is the first word in the document number or title. I know there is a way to
get the search to return results for a word wherever it exists in the
sentence, but due to my lack of access experience I'm not sure how to modify
my SQL statement to allow for this.
Any help would be greatly appreciated!
I have a wildcard search which is linked to a form with 2 textboxes on it
which allow my users to enter search criteria. My current SQL statement looks
like this:
SELECT DOCUMENTS.[UNIQUE ID], DOCUMENTS.[DOC ID], DOCUMENTS.[DOC TITLE]
FROM DOCUMENTS
WHERE (((DOCUMENTS.[DOC ID]) Like [Forms]![frmWildcardSearch]![cboDocNumber]
& "*") AND ((DOCUMENTS.[DOC TITLE]) Like
[Forms]![frmWildcardSearch]![cboDocTitle] & "*")) OR (((DOCUMENTS.[DOC
TITLE]) Like [Forms]![frmWildcardSearch]![cboDocTitle] & "*") AND
(([Forms]![frmWildcardSearch]![cboDocNumber]) Is Null)) OR (((DOCUMENTS.[DOC
ID]) Like [Forms]![frmWildcardSearch]![cboDocNumber] & "*") AND
(([Forms]![frmWildcardSearch]![cboDocTitle]) Is Null)) OR
((([Forms]![frmWildcardSearch]![cboDocNumber]) Is Null) AND
(([Forms]![frmWildcardSearch]![cboDocTitle]) Is Null));
This search currently only will return search results if the word typed in
is the first word in the document number or title. I know there is a way to
get the search to return results for a word wherever it exists in the
sentence, but due to my lack of access experience I'm not sure how to modify
my SQL statement to allow for this.
Any help would be greatly appreciated!