Doing a requery after every key stroke seems like a lot of overhead. I
would let them type, then click a search button or something like that.
Assuming [Forms].[Busca].[txtbxFiltroEMail] = "Micro" then if the criteria
for a field is:
Like [Forms].[Busca].[txtbxFiltroEMail].[text] & "*"
it should retrieve records with field values starting with "Micro" such as
Microsoft and Microscope, but not Sun Microsystems". For that you would
need:
Like "*" & [Forms].[Busca].[txtbxFiltroEMail].[text] & "*"
I'm not convinced the text property is working as you intend. I would
text it by putting it into the query, maybe by adding it as a calculated
field:
TestText: [Forms].[Busca].[txtbxFiltroEMail].[text]
The trouble seems to be that if [Forms].[Busca].[txtbxFiltroEMail].[text]
has no value, the expression is just the wildcard, which would indeed
return all records. Actually, I think it would return just records that
are not null in that field. To return nulls too I think you will need to
test specifically using Is Null in an expression.
Henry said:
Bruce,
I had it right and made it wrong.
Indeed it must me .text because the requery is triggered by a OnKeyUp.
The searching process goes as we type.
Indeed it made sense to me that just * would retrieve anything include
empties, but it looks otherwise. Looks like * retrieves anything as
long as there is anything (bogus sentence?).
Henry