How to search whole database for a string

J

Jerry C

I would like to search all tables for a string. Sort of
like using Windows search for Files and Folders or like
searching on a PDA.
 
J

John Vinson

I would like to search all tables for a string. Sort of
like using Windows search for Files and Folders or like
searching on a PDA.

This would be a very uncommon requirement in a properly normalized
database. You wouldn't want to search a ZipCode field for last names,
or vice versa! Normally each field contains its own distinctive type
of data.

So... there's no easy way to do this other than to build a Query on
each table, with a criterion

LIKE "*" & [Enter search term:] & "*"

on each field, on separate query grid lines to use OR logic; or to
write some rather snarky VBA code to open each table as a Recordset,
step through the fields, and search each of them.

Could you explain the nature of your tables which make this very
unusual search necessary?

John W. Vinson[MVP]
 
Top