K
kraasty
I have a form (myForm) with a query (myQuery) with many fields as
datasource.
When I set the variable:
stCriteria = " FIELD1 Like '*abc*' OR Field2 Like '*abc*' "
and run the command: DoCmd.OpenForm "myForm", , , stCriteria
the form displays only the records matching the criteria in the [Field1] and
[Field2] fields.
Is there a way to form the WHERE statement so that the "abc" text is
searched in all
the fields of the query without having to repeat the "FIELDx LIKE sometext
OR"
for every field of the query?
Thank you,
Andreas
datasource.
When I set the variable:
stCriteria = " FIELD1 Like '*abc*' OR Field2 Like '*abc*' "
and run the command: DoCmd.OpenForm "myForm", , , stCriteria
the form displays only the records matching the criteria in the [Field1] and
[Field2] fields.
Is there a way to form the WHERE statement so that the "abc" text is
searched in all
the fields of the query without having to repeat the "FIELDx LIKE sometext
OR"
for every field of the query?
Thank you,
Andreas