Hi
I am trying to create a query that searches a field for specifically
*******, not wildcard
I am running Access2000
Thanks
Andrea - 27 Feb 2007 16:17 GMT
Are you specifically searching for 7 characters or would you just like for
the query to pick up the keyword you enter into the field?
If it is the latter, you can use the following:
Like "*" & [forms]![FormNamehere]![FieldValueNameHere] & "*"

Signature
Andrea
> Hi
> I am trying to create a query that searches a field for specifically
> *******, not wildcard
> I am running Access2000
> Thanks
John W. Vinson - 27 Feb 2007 17:51 GMT
>Hi
>I am trying to create a query that searches a field for specifically
>*******, not wildcard
>I am running Access2000
>Thanks
The LIKE operator uses wildcards such as *; the = operator does not.
If you're searching for seven asterisks as the actual content of the
field simply use that as a criterion:
"*******"
on the Criteria line. In SQL it would be
WHERE ([fieldname] = "*******")
John W. Vinson [MVP]
Ken Sheridan - 27 Feb 2007 18:04 GMT
Do you mean where the field contains a literal string of seven asterisks?
If so and the string is the complete value in the field then simply use the
equality operator:
SELECT *
FROM [MyTable]
WHERE [MyField] = "*******";
If the seven asterisks are a substring within the field then use the INSTR
function:
SELECT *
FROM [MyTable]
WHERE INSTR([MyField],"*******") > 0;
Ken Sheridan
Stafford, England
> Hi
> I am trying to create a query that searches a field for specifically
> *******, not wildcard
> I am running Access2000
> Thanks