Wildcard criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field in a form called [descripcion1]. I want to define a criteria
in a select query that give me all the results that match any part of a field
of what I write in the field called [descripcion1]. When I open the select
query in the Design View, in the criteria I write:
Like "*[Forms]![frm_Articulos_buscar_localizacion]![descripcion1]*"

When I run the query nothing match, it don’t produce records. I revise what
I am writing in the field and I know it should match some records.

For example, if in the criteria I write:
Like "*filtro*" , when I run the query it produces 5 records
But if in the criteria I write:
Like "*[Forms]![frm_Articulos_buscar_localizacion]![descripcion1]*"
and in the form field called [descripcion1] I write filtro, when I run the
query it produces 0 records.


Thanks in advance
Maria
 
maria said:
I have a field in a form called [descripcion1]. I want to define a criteria
in a select query that give me all the results that match any part of a field
of what I write in the field called [descripcion1]. When I open the select
query in the Design View, in the criteria I write:
Like "*[Forms]![frm_Articulos_buscar_localizacion]![descripcion1]*"

When I run the query nothing match, it don't produce records. I revise what
I am writing in the field and I know it should match some records.

For example, if in the criteria I write:
Like "*filtro*" , when I run the query it produces 5 records
But if in the criteria I write:
Like "*[Forms]![frm_Articulos_buscar_localizacion]![descripcion1]*"
and in the form field called [descripcion1] I write filtro, when I run the
query it produces 0 records.

Like "* " & [Forms]![frm_Articulos_buscar_localizacion]![descripcion1] & "*"
 
"*" & [Forms]![frm_Articulos_buscar_localizacion]![descripcion1] & "*"
 
Thank you for your quick response!
Ir works fine.

Always appreciate the help from the MVP's

Douglas J. Steele said:
"*" & [Forms]![frm_Articulos_buscar_localizacion]![descripcion1] & "*"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


maria said:
I have a field in a form called [descripcion1]. I want to define a
criteria
in a select query that give me all the results that match any part of a
field
of what I write in the field called [descripcion1]. When I open the
select
query in the Design View, in the criteria I write:
Like "*[Forms]![frm_Articulos_buscar_localizacion]![descripcion1]*"

When I run the query nothing match, it don't produce records. I revise
what
I am writing in the field and I know it should match some records.

For example, if in the criteria I write:
Like "*filtro*" , when I run the query it produces 5 records
But if in the criteria I write:
Like "*[Forms]![frm_Articulos_buscar_localizacion]![descripcion1]*"
and in the form field called [descripcion1] I write filtro, when I run the
query it produces 0 records.


Thanks in advance
Maria
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top