Query question?

  • Thread starter Thread starter gm
  • Start date Start date
G

gm

I have a table called incidents that contains a memo field called
DETAILS

I'd like to be able to prompt for a keyword that will return only
records with that keyword in the DETAILS field

For example, if I have the word "late" in the field, I want all
records with "late" in it displayed.

I can get it to work using
Like "*late*" in the criteria field but want to be able to prompt for
different words without creating a specific static query for each.

Thanks

Gary
 
Put a field on your form. For the sake of argument, let's assume that the
form is called frmLookup, and the field on the form is called txtDetails.

In your query, put Like "*" & Forms![frmLookup]![txtDetails] & "*" as the
criteria for the Details field.
 
Use the Parameter Query:

....
WHERE [Details] Like "*" & [Please enter keyword:] & "*"
 
Put a field on your form. For the sake of argument, let's assume that the
form is called frmLookup, and the field on the form is called txtDetails.

In your query, put Like "*" & Forms![frmLookup]![txtDetails] & "*" as the
criteria for the Details field.

Thanks - that worked fine

Gary
 
Back
Top