Find Records in Table

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

Guest

I want to find records in a table. Unfortunately, the field in the table is
upto 100 digits long and I need to return anything with values in these 100
digits. i.e. if I want to find something with 'Other' in the field, this
could be at the beginning of the field, middle or end.

Hence just putting 'Other' as the criteria, doesn't work...
 
Andy said:
I want to find records in a table. Unfortunately, the field in the table is
upto 100 digits long and I need to return anything with values in these 100
digits. i.e. if I want to find something with 'Other' in the field, this
could be at the beginning of the field, middle or end.

Hence just putting 'Other' as the criteria, doesn't work...


Set the criteria to:

Like "*Other*"
 
Works great thanks. Second part is to use a command button in a form for this
to run (I'm fine with this), but is there anyway I can have a Dialog/Search
box for the user to enter 'Other' into and the *s are inserted around for
this to work as the query does?

Thanks
 
Rather than a dialog box, just add an unbound text box
(let's name it txtSearch) to the form (near the button) for
users to enter what they want to use in the criteria. The
query's criteria woulkd then be:
Like "*" & Forms!nameofform.txtSearch & "*"

If you really want to use a dialog type box instead, the
criteria would be something like:
Like "*" & [Enter search text] & "*"
 
Back
Top