O
orv
Access03
Ok I have an unbound search form with an unbound input field named
'txtNumber'.
The field is used to search for a number ie 09-0001. This is how the number
is saved in the table, tblCase.
When you click Search on the search form it performs a query. The expression
in the query is as follows:
Expr1: tblCase!CaseNumber Like "*" & Forms!frmSearch!txtNumber & "*" Or
Forms!frmSearch!txtNumber Is Null
no sort and no criteria
[tblCase]![CaseNumber] Like "*" & [Forms]![frmSearch]![txtNumber] & "*" Or
[Forms]![frmSearch]![txtNumber] Is Null
no sort, criteria=true
The field txtNumber in tblCase is Data Type = Number, Format = 00-0000, Inpu
Mask= 99\-9999.
With the above expressions in the query, if I have say 09-1111, 09-0009,
07-7777, 08-1111, as data in the CaseNumber of tblCase these are the results
of the search:
09-1111 = No records
1, 11, 111, or 1111 = returns 09-1111,08-1111
09 = 09-0009
I have tried using the '#' instead of the asterisk with no results. I have
also tried using some patterns with no luck.
I would like to be able to search by entering the number either as 09-1111
or 091111.
Any help is greatly appreciated.
The search form has other unbound txt fields which work flawlessly.
Ok I have an unbound search form with an unbound input field named
'txtNumber'.
The field is used to search for a number ie 09-0001. This is how the number
is saved in the table, tblCase.
When you click Search on the search form it performs a query. The expression
in the query is as follows:
Expr1: tblCase!CaseNumber Like "*" & Forms!frmSearch!txtNumber & "*" Or
Forms!frmSearch!txtNumber Is Null
no sort and no criteria
[tblCase]![CaseNumber] Like "*" & [Forms]![frmSearch]![txtNumber] & "*" Or
[Forms]![frmSearch]![txtNumber] Is Null
no sort, criteria=true
The field txtNumber in tblCase is Data Type = Number, Format = 00-0000, Inpu
Mask= 99\-9999.
With the above expressions in the query, if I have say 09-1111, 09-0009,
07-7777, 08-1111, as data in the CaseNumber of tblCase these are the results
of the search:
09-1111 = No records
1, 11, 111, or 1111 = returns 09-1111,08-1111
09 = 09-0009
I have tried using the '#' instead of the asterisk with no results. I have
also tried using some patterns with no luck.
I would like to be able to search by entering the number either as 09-1111
or 091111.
Any help is greatly appreciated.
The search form has other unbound txt fields which work flawlessly.